Package io.jans.configapi.util
Class AuthUtil
java.lang.Object
io.jans.configapi.util.AuthUtil
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidassignAllScope(String clientId) booleancontainsAnyElement(List<String> list1, List<String> list2) booleancontainsField(List<Field> allFields, String attribute) decryptPassword(String clientPassword) encryptPassword(String clientPassword) findMissingElements(List<String> list1, List<String> list2) findMissingScopes(Map<io.jans.configapi.core.util.ProtectionScopeType, List<String>> scopeMap, List<String> tokenScopes) io.jans.as.model.uma.wrapper.TokengetAccessToken(String tokenUrl, String clientId, List<String> scopes) io.jans.configapi.model.configuration.AgamaConfigurationgetAllFields(Class<?> type) getAllFields(List<Field> fields, Class<?> type) getAllScopeList(Map<io.jans.configapi.core.util.ProtectionScopeType, List<String>> scopeMap) String[]getAllScopesArray(List<String> scopes) static io.jans.orm.model.base.CustomObjectAttributegetAttribute(List<io.jans.orm.model.base.CustomObjectAttribute> customAttributes, String attributeName) getAttributeValueList(List<io.jans.orm.model.base.CustomObjectAttribute> customAttributes, String attributeName) io.jans.configapi.model.configuration.AuditLogConfgetAuthSpecificScopeRequired(jakarta.ws.rs.container.ResourceInfo resourceInfo) io.jans.as.common.model.registration.ClientgetClientDecryptPassword(String clientId) getClientPassword(String clientId) io.jans.configapi.model.configuration.DataFormatConversionConfgetInputStream(ByteArrayOutputStream output) io.jans.as.model.common.IntrospectionResponsegetIntrospectionResponse(String token) getJsonNodeKeyValue(com.fasterxml.jackson.databind.JsonNode jsonNode, String key) io.jans.configapi.core.model.role.RolePermissionMappingList<io.jans.configapi.model.configuration.PluginConf>getRequestedScopes(jakarta.ws.rs.container.ResourceInfo resourceInfo) getResourceScopesByType(jakarta.ws.rs.container.ResourceInfo resourceInfo) getScopeWithDn(List<String> scopes) getServiceUrl(String url) io.jans.as.common.model.common.UsergetUserByInum(String inum) getUserInum(jakarta.ws.rs.core.HttpHeaders httpHeaders) getUserPermission(Set<String> userRoleSet) getUserRole(io.jans.as.common.model.common.User user) getUserRolePermission(jakarta.ws.rs.core.HttpHeaders httpHeaders) booleanisEqualCollection(List<String> list1, List<String> list2) booleanbooleanbooleanbooleanbooleanbooleanisValidIssuer(String issuer) parseStringToDateObj(String dateString) static StringrequestAccessToken(String clientId, List<String> scope) resolveAuthServerUrl(String publishedUrl) Rebases a URL published by the auth server onto the injected auth server address.booleanvalidateScope(List<String> authScopes, List<String> resourceScopes)
-
Constructor Details
-
AuthUtil
public AuthUtil()
-
-
Method Details
-
getOpenIdConfigurationEndpoint
-
getAuthOpenidConfigurationUrl
-
getAuditLogConf
public io.jans.configapi.model.configuration.AuditLogConf getAuditLogConf() -
getDataFormatConversionConf
public io.jans.configapi.model.configuration.DataFormatConversionConf getDataFormatConversionConf() -
getPluginConf
-
isUserRolePermissionValidationEnabled
public boolean isUserRolePermissionValidationEnabled() -
isValidateUserInumInIntrospectionFlag
public boolean isValidateUserInumInIntrospectionFlag() -
getUserRolePermissionExcludedClients
-
isFetchUserRoleInIntrospectionFlag
public boolean isFetchUserRoleInIntrospectionFlag() -
getIssuer
-
resolveAuthServerUrl
Rebases a URL published by the auth server onto the injected auth server address.Used for endpoints that have no injected counterpart of their own. The path, query and fragment of the published URL are preserved and only the scheme and authority are replaced, which mirrors how the injected endpoints are derived in the first place. Returns the published URL unchanged when injection is disabled, when no injected issuer is configured, or when either value cannot be parsed.
- Parameters:
publishedUrl- URL published by the auth server- Returns:
- the URL to call
-
getIntrospectionEndpoint
-
getTokenEndpoint
-
getEndSessionEndpoint
-
getServiceUrl
-
getClientId
-
getUserExclusionAttributes
-
getUserExclusionAttributesAsString
-
getUserMandatoryAttributes
-
getAgamaConfiguration
public io.jans.configapi.model.configuration.AgamaConfiguration getAgamaConfiguration() -
getTokenUrl
-
getTokenRevocationEndpoint
-
getClient
-
getClientPassword
-
getClientDecryptPassword
-
decryptPassword
-
encryptPassword
-
getRequestedScopes
-
validateScope
-
requestAccessToken
-
getAccessToken
-
assignAllScope
-
getAllScopes
-
getAllScopesArray
-
getScopeWithDn
-
isValidIssuer
-
getAuthSpecificScopeRequired
-
findMissingElements
-
containsAnyElement
-
isEqualCollection
-
containsField
-
getAllFields
-
getAllFields
-
isValidDn
-
isValidDn
-
getAllScopeList
-
parseStringToDateObj
-
getByteArrayOutputStream
- Throws:
IOException
-
getInputStream
-
readFile
-
findMissingScopes
-
getResourceScopesByType
-
getUserRolePermission
-
getUserPermission
-
getUserRole
-
getAttribute
-
getAttributeValueList
-
getUserInum
-
getUserByInum
-
getPermissionsMappingByRole
public io.jans.configapi.core.model.role.RolePermissionMapping getPermissionsMappingByRole(String role) -
getIntrospectionResponse
-
getJsonNodeKeyValue
-