public abstract class AbstractUserInfoResponseBuilder extends Object implements UserInfoResponseBuilder
| Constructor and Description |
|---|
AbstractUserInfoResponseBuilder() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract String |
buildResponse(org.wso2.carbon.auth.token.introspection.dto.IntrospectionResponse introspectionResponse,
Map<String,Object> filteredUserAttributes)
Build UserInfo response to be sent back to the client.
|
String |
getResponseString(org.wso2.carbon.auth.token.introspection.dto.IntrospectionResponse introspectionResponse)
Get response string based on the introspection response
|
protected String |
getSubjectAttribute(org.wso2.carbon.auth.token.introspection.dto.IntrospectionResponse introspectionResponse)
Get the 'sub' attribute.
|
protected Map<String,Object> |
getUserAttributesFilteredByScope(Map<String,org.wso2.charon3.core.attributes.Attribute> userAttributes,
String[] requestedScopes)
Filter user attributes based on the requested scopes.
|
protected abstract Map<String,org.wso2.charon3.core.attributes.Attribute> |
retrieveUserAttributes(org.wso2.carbon.auth.token.introspection.dto.IntrospectionResponse introspectionResponse)
Retrieve User attributes.
|
public String getResponseString(org.wso2.carbon.auth.token.introspection.dto.IntrospectionResponse introspectionResponse) throws UserInfoException
getResponseString in interface UserInfoResponseBuilderintrospectionResponse - Introspection responseUserInfoException - if failed to get user information based on the introspect responseUserInfoResponseBuilder.getResponseString(IntrospectionResponse)protected abstract Map<String,org.wso2.charon3.core.attributes.Attribute> retrieveUserAttributes(org.wso2.carbon.auth.token.introspection.dto.IntrospectionResponse introspectionResponse) throws UserInfoException
introspectionResponse - Introspection responseUserInfoException - if failed to retrieve user attributesprotected Map<String,Object> getUserAttributesFilteredByScope(Map<String,org.wso2.charon3.core.attributes.Attribute> userAttributes, String[] requestedScopes) throws UserInfoException
userAttributes - Map of user attributesrequestedScopes - Requested scopesUserInfoException - If failed to get user attributes filterd by scopeprotected String getSubjectAttribute(org.wso2.carbon.auth.token.introspection.dto.IntrospectionResponse introspectionResponse)
introspectionResponse - Introspection responseprotected abstract String buildResponse(org.wso2.carbon.auth.token.introspection.dto.IntrospectionResponse introspectionResponse, Map<String,Object> filteredUserAttributes) throws UserInfoException
introspectionResponse - Introspection responsefilteredUserAttributes - Filtered user attributes based on the requested scopesUserInfoException - if failed to build the responseCopyright © 2018 WSO2. All rights reserved.