public class OpenIDAuthenticationManagerGeneric extends Object implements OpenIDAuthenticationManager
Constructor and Description |
---|
OpenIDAuthenticationManagerGeneric(SiteManager siteManager,
AuthRecordManager authRecordManager,
OpenIDPropertyManager openIDPropertyManager,
UserManager userManager) |
Modifier and Type | Method and Description |
---|---|
OpenIDAuthResponse |
allowRequest(User user,
long profileID,
OpenIDAuthRequest authReq,
boolean alwaysAllow)
Process a request if the "allow" or "allow always" action
is taken by the user when a site has requested authentication.
|
OpenIDAuthResponse |
autoAllowRequest(User user,
OpenIDAuthRequest authReq)
Processes a request if the "allow_always" flag has been set
for the requesting site.
|
OpenIDAuthResponse |
checkImmediate(User principal,
Locale locale,
OpenIDAuthRequest authReq)
A convenience wrapper for the autoAllowRequest method.
|
OpenIDAuthResponse |
denyRequest(User user,
OpenIDAuthRequest authReq)
Process a request if the "deny" action is taken by the user
when a site has requested authentication.
|
static String |
effectiveIdentifier(OpenIDAuthRequest authReq,
User user)
Select an identifier for this request, using the currently logged-in user if identifier
selection is requested.
|
void |
validateRequest(User user,
OpenIDAuthRequest authReq)
Validates the OpenID authentication request.
|
public OpenIDAuthenticationManagerGeneric(SiteManager siteManager, AuthRecordManager authRecordManager, OpenIDPropertyManager openIDPropertyManager, UserManager userManager)
public void validateRequest(User user, OpenIDAuthRequest authReq) throws InvalidRequestException, SiteDisallowedException, IdentifierViolationException
OpenIDAuthenticationManager
validateRequest
in interface OpenIDAuthenticationManager
user
- logged in user.authReq
- OpenID authentication request.InvalidRequestException
- if authReq is null or the return_to URL is invalid/malformed.SiteDisallowedException
- if the site is disallowed by whitelist/blacklist or the site is localhost and local return_to URLs have been disallowed.IdentifierViolationException
- if the principal does not own the OpenID identifier.public OpenIDAuthResponse checkImmediate(User principal, Locale locale, OpenIDAuthRequest authReq)
OpenIDAuthenticationManager
checkImmediate
in interface OpenIDAuthenticationManager
principal
- principal corresponding to logged in user.locale
- locale of the logged in user.authReq
- authentication request of the user.public OpenIDAuthResponse autoAllowRequest(User user, OpenIDAuthRequest authReq)
OpenIDAuthenticationManager
autoAllowRequest
in interface OpenIDAuthenticationManager
user
- user processing request.authReq
- OpenIDAuthRequest being processed.public OpenIDAuthResponse denyRequest(User user, OpenIDAuthRequest authReq)
OpenIDAuthenticationManager
denyRequest
in interface OpenIDAuthenticationManager
user
- user processing request.authReq
- OpenIDAuthRequest being processed.public OpenIDAuthResponse allowRequest(User user, long profileID, OpenIDAuthRequest authReq, boolean alwaysAllow)
OpenIDAuthenticationManager
allowRequest
in interface OpenIDAuthenticationManager
user
- user processing request.profileID
- ID of profile containing attributes to be used in response.authReq
- OpenIDAuthRequest being processed.alwaysAllow
- true if the user wants to trust the site.public static String effectiveIdentifier(OpenIDAuthRequest authReq, User user)
IllegalArgumentException
- if identifier selection is requested but user
is null
Copyright © 2017 Atlassian. All rights reserved.