Class OAuth2ResourceOwnerAccessAuthorizeManager
- java.lang.Object
-
- net.sourceforge.plantuml.security.authentication.oauth.AbstractOAuth2AccessAuthorizeManager
-
- net.sourceforge.plantuml.security.authentication.oauth.OAuth2ResourceOwnerAccessAuthorizeManager
-
- All Implemented Interfaces:
SecurityAuthorizeManager
public class OAuth2ResourceOwnerAccessAuthorizeManager extends AbstractOAuth2AccessAuthorizeManager
Authorize via principal a resource owner (fromSecurityCredentials
and creates aSecurityAuthentication
object with a bearer token secret.Because a pass through of username/password is an anti-pattern in OAuth2, this authorization method should be avoided. However, it may be necessary in some environments to gain access with the ROPC flow.
- Author:
- Aljoscha Rittner
-
-
Constructor Summary
Constructors Constructor Description OAuth2ResourceOwnerAccessAuthorizeManager()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SecurityAuthentication
create(SecurityCredentials credentials)
Creates from the credentials the authentication object to access an endpoint.-
Methods inherited from class net.sourceforge.plantuml.security.authentication.oauth.AbstractOAuth2AccessAuthorizeManager
buildAccessDataFromResponse, headers, requestAndCreateAuthFromResponse, urlEncode
-
-
-
-
Method Detail
-
create
public SecurityAuthentication create(SecurityCredentials credentials)
Description copied from interface:SecurityAuthorizeManager
Creates from the credentials the authentication object to access an endpoint. If the credentials defines a principal (e.g. in OAuth2), the create method should authorize the principal and get the final authentication data to access an endpoint.- Parameters:
credentials
- the configured credentials- Returns:
- the authentication object.
-
-