mirror of
https://github.com/pomerium/pomerium.git
synced 2025-04-28 18:06:34 +02:00
add encrypt/decrypt tests
This commit is contained in:
parent
c19edb2fdd
commit
bce9147f84
1 changed files with 4 additions and 0 deletions
|
@ -20,6 +20,10 @@ func CreateCode(
|
|||
ad string,
|
||||
cipher cipher.AEAD,
|
||||
) (string, error) {
|
||||
if expires.IsZero() {
|
||||
return "", fmt.Errorf("validate: zero expiration")
|
||||
}
|
||||
|
||||
v := oauth21proto.Code{
|
||||
Id: id,
|
||||
ExpiresAt: timestamppb.New(expires),
|
||||
|
|
Loading…
Add table
Reference in a new issue