-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cleanup: rework AuthService around
credential_to_principal
- Loading branch information
Showing
6 changed files
with
58 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
fstar/treesync/symbolic/MLS.TreeSync.Symbolic.AuthService.CredentialInterpretation.fst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
module MLS.TreeSync.Symbolic.AuthService.CredentialInterpretation | ||
|
||
open Comparse | ||
|
||
let credential_to_principal cred = | ||
match cred with | ||
| C_basic identity -> | ||
(ps_prefix_to_ps_whole ps_principal).parse (identity <: bytes) | ||
| _ -> None |
10 changes: 10 additions & 0 deletions
10
fstar/treesync/symbolic/MLS.TreeSync.Symbolic.AuthService.CredentialInterpretation.fsti
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
module MLS.TreeSync.Symbolic.AuthService.CredentialInterpretation | ||
|
||
open DY.Core | ||
open DY.Lib | ||
open MLS.NetworkTypes | ||
|
||
val credential_to_principal: | ||
credential_nt bytes -> | ||
option principal | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters