Class AzureAdAuthenticator

    • Field Detail

      • AZUREAD_STATE_TTL

        protected static final java.lang.String AZUREAD_STATE_TTL
        See Also:
        Constant Field Values
      • AZUREAD_AUTHORITY

        protected static final java.lang.String AZUREAD_AUTHORITY
        See Also:
        Constant Field Values
      • AZUREAD_CLIENT_SECRET

        protected static final java.lang.String AZUREAD_CLIENT_SECRET
        See Also:
        Constant Field Values
      • AZUREAD_CLIENT_ID

        protected static final java.lang.String AZUREAD_CLIENT_ID
        See Also:
        Constant Field Values
      • AZUREAD_REPLY_URL

        protected static final java.lang.String AZUREAD_REPLY_URL
        See Also:
        Constant Field Values
      • ERROR_DESCRIPTION

        protected static final java.lang.String ERROR_DESCRIPTION
        See Also:
        Constant Field Values
      • acquisitionTimeout

        protected long acquisitionTimeout
      • groupCache

        protected com.google.common.cache.Cache<java.lang.String,​org.codelibs.core.misc.Pair<java.lang.String[],​java.lang.String[]>> groupCache
      • groupCacheExpiry

        protected long groupCacheExpiry
    • Constructor Detail

      • AzureAdAuthenticator

        public AzureAdAuthenticator()
    • Method Detail

      • init

        @PostConstruct
        public void init()
      • getAuthUrl

        protected java.lang.String getAuthUrl​(javax.servlet.http.HttpServletRequest request)
      • storeStateInSession

        protected void storeStateInSession​(javax.servlet.http.HttpSession session,
                                           java.lang.String state,
                                           java.lang.String nonce)
      • processAuthenticationData

        protected org.lastaflute.web.login.credential.LoginCredential processAuthenticationData​(javax.servlet.http.HttpServletRequest request)
      • parseAuthenticationResponse

        protected com.nimbusds.openid.connect.sdk.AuthenticationResponse parseAuthenticationResponse​(java.lang.String url,
                                                                                                     java.util.Map<java.lang.String,​java.util.List<java.lang.String>> params)
      • getAccessToken

        public com.microsoft.aad.adal4j.AuthenticationResult getAccessToken​(java.lang.String refreshToken)
      • getAccessToken

        protected com.microsoft.aad.adal4j.AuthenticationResult getAccessToken​(com.nimbusds.oauth2.sdk.AuthorizationCode authorizationCode,
                                                                               java.lang.String currentUri)
      • validateAuthRespMatchesCodeFlow

        protected void validateAuthRespMatchesCodeFlow​(com.nimbusds.openid.connect.sdk.AuthenticationSuccessResponse oidcResponse)
      • removeStateFromSession

        protected AzureAdAuthenticator.StateData removeStateFromSession​(javax.servlet.http.HttpSession session,
                                                                        java.lang.String state)
      • containsAuthenticationData

        protected boolean containsAuthenticationData​(javax.servlet.http.HttpServletRequest request)
      • processMemberOf

        protected void processMemberOf​(AzureAdCredential.AzureAdUser user,
                                       java.util.List<java.lang.String> groupList,
                                       java.util.List<java.lang.String> roleList,
                                       java.lang.String url)
      • processParentGroup

        protected void processParentGroup​(AzureAdCredential.AzureAdUser user,
                                          java.util.List<java.lang.String> groupList,
                                          java.util.List<java.lang.String> roleList,
                                          java.lang.String id)
      • getParentGroup

        protected org.codelibs.core.misc.Pair<java.lang.String[],​java.lang.String[]> getParentGroup​(AzureAdCredential.AzureAdUser user,
                                                                                                          java.lang.String id)
      • processGroup

        protected void processGroup​(AzureAdCredential.AzureAdUser user,
                                    java.util.List<java.lang.String> groupList,
                                    java.util.List<java.lang.String> roleList,
                                    java.lang.String id)
      • getDefaultGroupList

        protected java.util.List<java.lang.String> getDefaultGroupList()
      • getDefaultRoleList

        protected java.util.List<java.lang.String> getDefaultRoleList()
      • getClientId

        protected java.lang.String getClientId()
      • getClientSecret

        protected java.lang.String getClientSecret()
      • getTenant

        protected java.lang.String getTenant()
      • getAuthority

        protected java.lang.String getAuthority()
      • getStateTtl

        protected long getStateTtl()
      • getReplyUrl

        protected java.lang.String getReplyUrl​(javax.servlet.http.HttpServletRequest request)
      • setAcquisitionTimeout

        public void setAcquisitionTimeout​(long acquisitionTimeout)
      • setGroupCacheExpiry

        public void setGroupCacheExpiry​(long groupCacheExpiry)