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

authmate: Add lifetime for tokens #114

Merged

Conversation

masterSplinter01
Copy link
Contributor

@masterSplinter01 masterSplinter01 commented Jun 28, 2021

Closes #108

@KirillovDenis
Copy link
Contributor

I think we should mention the issue

@masterSplinter01 masterSplinter01 force-pushed the feature/lifetime-authmate branch from 838323e to 205650c Compare June 28, 2021 13:35
return 0, err
} else if networkInfo, err := conn.NetworkInfo(ctx); err != nil {
return 0, err
} else {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Last return can be outside else branch

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It can't given the way variables are defined.

Signed-off-by: Angira Kekteeva <kira@nspcc.ru>
@masterSplinter01 masterSplinter01 force-pushed the feature/lifetime-authmate branch from 205650c to 6689af5 Compare June 28, 2021 14:17
@@ -283,7 +312,7 @@ func buildBearerTokens(key *keys.PrivateKey, table *eacl.Table, gatesKeys []*key
return bearerTokens, nil
}

func buildSessionToken(key *keys.PrivateKey, oid *owner.ID, ctx *session.ContainerContext, gateKey *keys.PublicKey) (*session.Token, error) {
func buildSessionToken(key *keys.PrivateKey, oid *owner.ID, lifetime lifetimeOptions, ctx *session.ContainerContext, gateKey *keys.PublicKey) (*session.Token, error) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems there are too many arguments. Maybe we should introduce some new type?

@roman-khimov roman-khimov merged commit 6f12c25 into nspcc-dev:master Jun 28, 2021
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.

Lifetime of tokens in authmate
3 participants