Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add util functions for tokens #152

Merged
merged 5 commits into from
Mar 2, 2020

Conversation

lobkovilya
Copy link
Contributor

Description

Add two functions:

  • GenerateToken(ctx context.Context, p Provider, expiresAt time.Duration) (string, error)
  • VerifyToken(token string, x509crt *x509.Certificate) error

Cover them with unit tests.

Signed-off-by: Ilya Lobkov ilya.lobkov@xored.com

Ilya Lobkov added 3 commits February 27, 2020 13:59
Signed-off-by: Ilya Lobkov <ilya.lobkov@xored.com>
Signed-off-by: Ilya Lobkov <ilya.lobkov@xored.com>
Signed-off-by: Ilya Lobkov <ilya.lobkov@xored.com>
.golangci.yml Outdated Show resolved Hide resolved
pkg/tools/security/token_test.go Outdated Show resolved Hide resolved
Ilya Lobkov added 2 commits February 29, 2020 18:50
Signed-off-by: Ilya Lobkov <ilya.lobkov@xored.com>
Signed-off-by: Ilya Lobkov <ilya.lobkov@xored.com>
@lobkovilya lobkovilya mentioned this pull request Mar 2, 2020
@edwarnicke edwarnicke merged commit 55d2d2d into networkservicemesh:master Mar 2, 2020
nsmbot pushed a commit that referenced this pull request Aug 14, 2024
…i@main

PR link: networkservicemesh/api#152

Commit: 03f6633
Author: Nikita Skrynnik
Date: 2024-08-14 20:39:07 +1100
Message:
  - Delete unused helper functions (#152)
* delete some helper functions

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* delete more hepler functions

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* delete more unused helper function

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* fix linter

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* return som e helper functions

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* fix CI

Signed-off-by: NikitaSkrynnik <nikita.skrynnik@xored.com>

---------

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>
Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
denis-tingaikin pushed a commit that referenced this pull request Aug 14, 2024
…i@main (#1630)

PR link: networkservicemesh/api#152

Commit: 03f6633
Author: Nikita Skrynnik
Date: 2024-08-14 20:39:07 +1100
Message:
  - Delete unused helper functions (#152)
* delete some helper functions



* delete more hepler functions



* delete more unused helper function



* fix linter



* return som e helper functions



* fix CI



---------

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>
Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
Co-authored-by: NSMBot <nsmbot@networkservicmesh.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants