Package org.cyclos.services.access
Interface OidcService
-
- All Superinterfaces:
Service
- All Known Subinterfaces:
OidcServiceLocal
public interface OidcService extends Service
Service used to implement the OpenID Connect operations
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description AuthorizeResponseapprove(@NotNull ConsentParams params)Approves the given authorization request.AuthorizeResponseauthorize(@NotNull AuthorizeRequest params)Performs the OAuth2 / OpenID connect authorization request.AuthorizeResponsedeny(@NotNull String locator)Denies the given authorization request.ConsentDatagetConsentData(@NotNull String locator)Returns data to be displayed in a consent page.OpenidConfigurationgetOpenidConfiguration()Returns the OpenID Connect configuration to be returned on .well-known/openid-configurationObjectgetPublicKeys()Returns the public keys for this networkRegisterResponseregister(@NotNull RegisterRequest params)Performs the OpenID dynamic client registration request.voidrevoke(@NotNull RevokeRequest revoke)Performs the OAuth2 token revocation request.TokenResponsetoken(@NotNull TokenRequest params)Performs the OAuth2 / OpenID connect token request.Map<String,Object>userInfo()Returns the authenticated user claims
-
-
-
Method Detail
-
approve
AuthorizeResponse approve(@NotNull @NotNull ConsentParams params) throws FrameworkException
Approves the given authorization request. The request is obtained from the locator parameter, while the user is authenticated via user / password with any allowed principal types and access password for the main channel.- Throws:
FrameworkException
-
authorize
AuthorizeResponse authorize(@NotNull @NotNull AuthorizeRequest params) throws FrameworkException, OidcException
Performs the OAuth2 / OpenID connect authorization request. The result is the redirect URL for the user to get the login / consent.- Throws:
OidcException- If any parameter or state is invalidFrameworkException- See Also:
- Authorize request
-
deny
AuthorizeResponse deny(@NotNull @NotNull String locator) throws FrameworkException
Denies the given authorization request. The request is obtained from the locator parameter, while the user is authenticated via user / password with any allowed principal types and access password for the main channel.- Throws:
FrameworkException
-
getConsentData
ConsentData getConsentData(@NotNull @NotNull String locator) throws FrameworkException
Returns data to be displayed in a consent page. The request needs to be pending authorization, or anEntityNotFoundExceptionis thrown.- Throws:
FrameworkException
-
getOpenidConfiguration
OpenidConfiguration getOpenidConfiguration() throws FrameworkException
Returns the OpenID Connect configuration to be returned on .well-known/openid-configuration- Throws:
FrameworkException
-
getPublicKeys
Object getPublicKeys() throws FrameworkException
Returns the public keys for this network- Throws:
FrameworkException
-
register
RegisterResponse register(@NotNull @NotNull RegisterRequest params) throws FrameworkException, OidcRegisterException
Performs the OpenID dynamic client registration request. The result is the redirect URL for the user to get the login / consent. Note that not all parameters in the specification are supported. For instance, we currently don't support any client provided jws / encryption, as well as some others.- Throws:
OidcRegisterException- If any parameter is invalidFrameworkException- See Also:
- Client registration request
-
revoke
void revoke(@NotNull @NotNull RevokeRequest revoke)Performs the OAuth2 token revocation request.
-
token
TokenResponse token(@NotNull @NotNull TokenRequest params) throws FrameworkException, OidcException
Performs the OAuth2 / OpenID connect token request.- Throws:
FrameworkExceptionOidcException
-
userInfo
Map<String,Object> userInfo() throws FrameworkException
Returns the authenticated user claims- Throws:
FrameworkException
-
-