Package x.oauth

Class AuthorizationServer

java.lang.Object
x.oauth.AuthorizationServer

public class AuthorizationServer extends Object
Contains all supported responses and response messages.
Author:
sakdsitt
  • Field Details

    • log

      protected static org.slf4j.Logger log
    • db

      protected DBManager db
    • scopeService

      protected ScopeService scopeService
  • Constructor Details

    • AuthorizationServer

      public AuthorizationServer()
  • Method Details

    • issueClientCredentials

      public ClientCredentials issueClientCredentials(javax.servlet.http.HttpServletRequest req) throws OAuthException
      Throws:
      OAuthException
    • issueAuthorizationCode

      public String issueAuthorizationCode(javax.servlet.http.HttpServletRequest req) throws OAuthException
      Throws:
      OAuthException
    • issueAccessToken

      public AccessToken issueAccessToken(javax.servlet.http.HttpServletRequest req) throws Exception, IOException
      Throws:
      Exception
      IOException
    • authenticateUser

      protected UserDetails authenticateUser(String username, String password, javax.servlet.http.HttpServletRequest authRequest) throws Exception
      Throws:
      Exception
    • getBasicAuthorizationClientCredentials

      public static String[] getBasicAuthorizationClientCredentials(javax.servlet.http.HttpServletRequest req) throws org.apache.commons.codec.DecoderException
      Throws:
      org.apache.commons.codec.DecoderException
    • findAuthCode

      protected AuthCode findAuthCode(TokenRequest tokenRequest)
    • isValidToken

      public AccessToken isValidToken(String token)
    • getApplicationInfo

      public ApplicationInfo getApplicationInfo(String clientId)
    • generateCode

      protected String generateCode()
    • isActiveClientId

      protected boolean isActiveClientId(String clientId)
    • isValidClientCredentials

      protected boolean isValidClientCredentials(String clientId, String clientSecret)
    • isActiveClient

      protected boolean isActiveClient(String clientId, String clientSecret)
    • isExistingClient

      protected boolean isExistingClient(String clientId)
    • getExpiresIn

      protected String getExpiresIn(String tokenGrantType, String scope)
    • revokeToken

      public boolean revokeToken(javax.servlet.http.HttpServletRequest req) throws OAuthException
      Throws:
      OAuthException
    • updateClientApp

      public boolean updateClientApp(javax.servlet.http.HttpServletRequest req, String clientId) throws OAuthException
      Throws:
      OAuthException