org.wso2.carbon.identity.oauth.endpoint.util
Class EndpointUtil

java.lang.Object
  extended by org.wso2.carbon.identity.oauth.endpoint.util.EndpointUtil

public class EndpointUtil
extends Object


Constructor Summary
EndpointUtil()
           
 
Method Summary
static String[] extractCredentialsFromAuthzHeader(String authorizationHeader)
          Extracts the username and password info from the HTTP Authorization Header
static String getAccessTokenValidator()
          Returns the access token validator class name
static String getErrorPageURL(String errorCode, String errorMessage, String appName, String redirect_uri)
          Returns the error page URL.
static String getHostName()
           
static String getLoginPageURL(String clientId, String sessionDataKey, boolean forceAuthenticate, boolean checkAuthentication, Set<String> scopes)
          Returns the login page URL.
static org.wso2.carbon.identity.oauth2.OAuth2Service getOAuth2Service()
          Returns the OAuth2Service instance
static org.wso2.carbon.identity.oauth2.OAuth2TokenValidationService getOAuth2TokenValidationService()
          Returns the OAuthServerConfiguration instance
static org.wso2.carbon.identity.oauth.config.OAuthServerConfiguration getOAuthServerConfiguration()
          Returns the OAuthServerConfiguration instance
static String getRealmInfo()
           
static String getSafeText(String text)
           
static String getScope(org.wso2.carbon.identity.oauth2.model.OAuth2Parameters params)
           
static String getUserConsentURL(org.wso2.carbon.identity.oauth2.model.OAuth2Parameters params, String loggedInUser, String sessionDataKey, boolean isOIDC)
          Returns the consent page URL.
static String getUserInfoClaimDialect()
          Return the claim dialect for the claim retriever
static String getUserInfoClaimRetriever()
          Returns the claim retriever class name
static String getUserInfoRequestValidator()
          Returns the request validator class name
static String getUserInfoResponseBuilder()
          Returns the response builder class name
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EndpointUtil

public EndpointUtil()
Method Detail

getOAuth2Service

public static org.wso2.carbon.identity.oauth2.OAuth2Service getOAuth2Service()
Returns the OAuth2Service instance

Returns:

getOAuthServerConfiguration

public static org.wso2.carbon.identity.oauth.config.OAuthServerConfiguration getOAuthServerConfiguration()
Returns the OAuthServerConfiguration instance

Returns:

getOAuth2TokenValidationService

public static org.wso2.carbon.identity.oauth2.OAuth2TokenValidationService getOAuth2TokenValidationService()
Returns the OAuthServerConfiguration instance

Returns:

getUserInfoRequestValidator

public static String getUserInfoRequestValidator()
                                          throws org.apache.amber.oauth2.common.exception.OAuthSystemException
Returns the request validator class name

Returns:
Throws:
org.apache.amber.oauth2.common.exception.OAuthSystemException

getAccessTokenValidator

public static String getAccessTokenValidator()
Returns the access token validator class name

Returns:

getUserInfoResponseBuilder

public static String getUserInfoResponseBuilder()
Returns the response builder class name

Returns:

getUserInfoClaimRetriever

public static String getUserInfoClaimRetriever()
Returns the claim retriever class name

Returns:

getUserInfoClaimDialect

public static String getUserInfoClaimDialect()
Return the claim dialect for the claim retriever

Returns:

extractCredentialsFromAuthzHeader

public static String[] extractCredentialsFromAuthzHeader(String authorizationHeader)
                                                  throws org.wso2.carbon.identity.oauth.common.exception.OAuthClientException
Extracts the username and password info from the HTTP Authorization Header

Parameters:
authorizationHeader - "Basic " + base64encode(username + ":" + password)
Returns:
String array with client id and client secret.
Throws:
org.wso2.carbon.identity.base.IdentityException - If the decoded data is null.
org.wso2.carbon.identity.oauth.common.exception.OAuthClientException

getErrorPageURL

public static String getErrorPageURL(String errorCode,
                                     String errorMessage,
                                     String appName,
                                     String redirect_uri)
Returns the error page URL. If appName is not null it will be added as query parameter to be displayed to the user. If redirect_uri is null the common error page URL will be returned.

Parameters:
errorCode -
errorMessage -
appName -
Returns:

getLoginPageURL

public static String getLoginPageURL(String clientId,
                                     String sessionDataKey,
                                     boolean forceAuthenticate,
                                     boolean checkAuthentication,
                                     Set<String> scopes)
                              throws UnsupportedEncodingException
Returns the login page URL.

Parameters:
checkAuthentication -
forceAuthenticate -
scopes -
Returns:
Throws:
UnsupportedEncodingException

getUserConsentURL

public static String getUserConsentURL(org.wso2.carbon.identity.oauth2.model.OAuth2Parameters params,
                                       String loggedInUser,
                                       String sessionDataKey,
                                       boolean isOIDC)
                                throws UnsupportedEncodingException
Returns the consent page URL.

Parameters:
params -
loggedInUser -
Returns:
Throws:
UnsupportedEncodingException

getScope

public static String getScope(org.wso2.carbon.identity.oauth2.model.OAuth2Parameters params)

getSafeText

public static String getSafeText(String text)

getRealmInfo

public static String getRealmInfo()

getHostName

public static String getHostName()


Copyright © 2015 WSO2. All rights reserved.