Package io.jmix.securityoauth2
Class SecurityOAuth2Properties
java.lang.Object
io.jmix.securityoauth2.SecurityOAuth2Properties
@ConfigurationProperties(prefix="jmix.security.oauth2")
@ConstructorBinding
public class SecurityOAuth2Properties
extends Object
-
Constructor Summary
ConstructorDescriptionSecurityOAuth2Properties
(String clientId, String clientSecret, int clientTokenExpirationTimeSec, int clientRefreshTokenExpirationTimeSec, String[] clientAuthorizedGrantTypes, boolean supportRefreshToken, boolean reuseRefreshToken, boolean tokenMaskingEnabled, boolean devMode, String devUsername) -
Method Summary
Modifier and TypeMethodDescriptionString[]
int
int
boolean
Development mode allows using of REST/GraphQL APIs without authentication token.boolean
boolean
boolean
-
Constructor Details
-
SecurityOAuth2Properties
public SecurityOAuth2Properties(@DefaultValue("client") String clientId, @DefaultValue("{noop}secret") String clientSecret, @DefaultValue("43200") int clientTokenExpirationTimeSec, @DefaultValue("31536000") int clientRefreshTokenExpirationTimeSec, @DefaultValue({"password","external","refresh_token"}) String[] clientAuthorizedGrantTypes, @DefaultValue("true") boolean supportRefreshToken, @DefaultValue("true") boolean reuseRefreshToken, @DefaultValue("true") boolean tokenMaskingEnabled, @DefaultValue("false") boolean devMode, String devUsername)
-
-
Method Details
-
getClientId
- Returns:
- authorized rest client id
-
getClientSecret
-
isTokenMaskingEnabled
public boolean isTokenMaskingEnabled()- Returns:
- token masking in application logs is enabled
-
getClientTokenExpirationTimeSec
public int getClientTokenExpirationTimeSec()- Returns:
- access token expiration time in seconds for the default client
-
getClientRefreshTokenExpirationTimeSec
public int getClientRefreshTokenExpirationTimeSec()- Returns:
- refresh token expiration time in seconds for the default client
-
getClientAuthorizedGrantTypes
- Returns:
- authorized grant types for the default client
-
isSupportRefreshToken
public boolean isSupportRefreshToken()- Returns:
- whether to support the refresh token
-
isReuseRefreshToken
public boolean isReuseRefreshToken()- Returns:
- whether to reuse refresh tokens (until expired)
-
isDevMode
public boolean isDevMode()Development mode allows using of REST/GraphQL APIs without authentication token. Default user that is used for all REST/GraphQL APIs invocation in dev mode is specified bygetDevUsername()
-
getDevUsername
- Returns:
- - username that is used for development mode.
See
isDevMode()
-