Package x.oauth
Class AuthorizationServer
java.lang.Object
x.oauth.AuthorizationServer
Contains all supported responses and response messages.
- Author:
- sakdsitt
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected DBManagerprotected static org.slf4j.Loggerprotected ScopeService -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected UserDetailsauthenticateUser(String username, String password, javax.servlet.http.HttpServletRequest authRequest) protected AuthCodefindAuthCode(TokenRequest tokenRequest) protected StringgetApplicationInfo(String clientId) static String[]getBasicAuthorizationClientCredentials(javax.servlet.http.HttpServletRequest req) protected StringgetExpiresIn(String tokenGrantType, String scope) protected booleanisActiveClient(String clientId, String clientSecret) protected booleanisActiveClientId(String clientId) protected booleanisExistingClient(String clientId) issueAccessToken(javax.servlet.http.HttpServletRequest req) issueAuthorizationCode(javax.servlet.http.HttpServletRequest req) issueClientCredentials(javax.servlet.http.HttpServletRequest req) protected booleanisValidClientCredentials(String clientId, String clientSecret) isValidToken(String token) booleanrevokeToken(javax.servlet.http.HttpServletRequest req) booleanupdateClientApp(javax.servlet.http.HttpServletRequest req, String clientId)
-
Field Details
-
log
protected static org.slf4j.Logger log -
db
-
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:
ExceptionIOException
-
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
-
isValidToken
-
getApplicationInfo
-
generateCode
-
isActiveClientId
-
isValidClientCredentials
-
isActiveClient
-
isExistingClient
-
getExpiresIn
-
revokeToken
- Throws:
OAuthException
-
updateClientApp
public boolean updateClientApp(javax.servlet.http.HttpServletRequest req, String clientId) throws OAuthException - Throws:
OAuthException
-