Skip to content

Commit

Permalink
add new inactivity timeout field to osin config
Browse files Browse the repository at this point in the history
  • Loading branch information
vareti committed Jun 26, 2020
1 parent 3fb99e4 commit fa2d21a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion config/v1/types_oauth.go
Expand Up @@ -61,7 +61,7 @@ type TokenConfig struct {
// If this value is not set, then tokens are valid until their expiry.
// Takes valid time duration string such as "5m", "1.5h" or "2h45m".
// +optional
AccessTokenInactivityTimeout metav1.Duration `json:"accessTokenInactivityTimeout,omitempty"`
AccessTokenInactivityTimeout *metav1.Duration `json:"accessTokenInactivityTimeout,omitempty"`
}

const (
Expand Down
18 changes: 9 additions & 9 deletions osin/v1/types.go
Expand Up @@ -395,19 +395,19 @@ type TokenConfig struct {
AuthorizeTokenMaxAgeSeconds int32 `json:"authorizeTokenMaxAgeSeconds"`
// accessTokenMaxAgeSeconds defines the maximum age of access tokens
AccessTokenMaxAgeSeconds int32 `json:"accessTokenMaxAgeSeconds"`
// accessTokenInactivityTimeoutSeconds defined the default token
// inactivity timeout for tokens granted by any client.
// Setting it to nil means the feature is completely disabled (default)
// The default setting can be overriden on OAuthClient basis.
// accessTokenInactivityTimeoutSeconds - DEPRECATED: setting this field has no effect.
// +optional
AccessTokenInactivityTimeoutSeconds *int32 `json:"accessTokenInactivityTimeoutSeconds,omitempty"`
// accessTokenInactivityTimeout defines the token inactivity timeout
// for tokens granted by any client.
// The value represents the maximum amount of time that can occur between
// consecutive uses of the token. Tokens become invalid if they are not
// used within this temporal window. The user will need to acquire a new
// token to regain access once a token times out.
// Valid values are:
// - 0: Tokens never time out
// - X: Tokens time out if there is no activity for X seconds
// The current minimum allowed value for X is 300 (5 minutes)
AccessTokenInactivityTimeoutSeconds *int32 `json:"accessTokenInactivityTimeoutSeconds,omitempty"`
// If this value is not set, then tokens are valid until their expiry.
// Takes valid time duration string such as "5m", "1.5h" or "2h45m".
// +optional
AccessTokenInactivityTimeout *metav1.Duration `json:"accessTokenInactivityTimeout,omitempty"`
}

// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
Expand Down

0 comments on commit fa2d21a

Please sign in to comment.