org.keycloak.protocol.saml

## Class SamlProtocol

- java.lang.Object
- - org.keycloak.protocol.saml.SamlProtocol

- All Implemented Interfaces:
    LoginProtocol, Provider

      public class SamlProtocol
      extends Object
      implements LoginProtocol

  Version:
    $Revision: 1 $
  Author:
    Bill Burke

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `ATTRIBUTE_FALSE_VALUE`
    `static String` | `ATTRIBUTE_TRUE_VALUE`
    `protected static org.jboss.logging.Logger` | `logger`
    `static String` | `LOGIN_PROTOCOL`
    `protected RealmModel` | `realm`
    `static String` | `SAML_ASSERTION_SIGNATURE`
    `static String` | `SAML_AUTHNSTATEMENT`
    `static String` | `SAML_BINDING`
    `static String` | `SAML_CLIENT_SIGNATURE_ATTRIBUTE`
    `static String` | `SAML_ENCRYPT`
    `static String` | `SAML_ENCRYPTION_CERTIFICATE_ATTRIBUTE`
    `static String` | `SAML_FORCE_POST_BINDING`
    `static String` | `SAML_GET_BINDING`
    `static String` | `SAML_MULTIVALUED_ROLES`
    `static String` | `SAML_POST_BINDING`
    `static String` | `SAML_REQUEST_ID`
    `static String` | `SAML_SERVER_SIGNATURE`
    `static String` | `SAML_SIGNATURE_ALGORITHM`
    `static String` | `SAML_SIGNING_CERTIFICATE_ATTRIBUTE`
    `protected KeycloakSession` | `session`
    `protected javax.ws.rs.core.UriInfo` | `uriInfo`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SamlProtocol()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `javax.ws.rs.core.Response` | `authenticated(UserSessionModel userSession, ClientSessionCode accessCode)`
    `void` | `backchannelLogout(UserSessionModel userSession, ClientSessionModel clientSession)`
    `javax.ws.rs.core.Response` | `cancelLogin(ClientSessionModel clientSession)`
    `void` | `close()`
    `javax.ws.rs.core.Response` | `consentDenied(ClientSessionModel clientSession)`
    `protected javax.ws.rs.core.Response` | `getErrorResponse(ClientSessionModel clientSession, String status)`
    `protected String` | `getResponseIssuer(RealmModel realm)`
    `static SignatureAlgorithm` | `getSignatureAlgorithm(ClientModel client)`
    `void` | `initClaims(SALM2LoginResponseBuilder builder, ClientModel model, UserModel user)`
    `javax.ws.rs.core.Response` | `invalidSessionError(ClientSessionModel clientSession)`
    `protected boolean` | `isPostBinding(ClientSessionModel clientSession)`
    `SamlProtocol` | `setRealm(RealmModel realm)`
    `SamlProtocol` | `setSession(KeycloakSession session)`
    `SamlProtocol` | `setUriInfo(javax.ws.rs.core.UriInfo uriInfo)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### logger

          protected static final org.jboss.logging.Logger logger

    - #### ATTRIBUTE_TRUE_VALUE

          public static final String ATTRIBUTE_TRUE_VALUE

      See Also:
        Constant Field Values

    - #### ATTRIBUTE_FALSE_VALUE

          public static final String ATTRIBUTE_FALSE_VALUE

      See Also:
        Constant Field Values

    - #### SAML_SIGNING_CERTIFICATE_ATTRIBUTE

          public static final String SAML_SIGNING_CERTIFICATE_ATTRIBUTE

      See Also:
        Constant Field Values

    - #### SAML_ENCRYPTION_CERTIFICATE_ATTRIBUTE

          public static final String SAML_ENCRYPTION_CERTIFICATE_ATTRIBUTE

      See Also:
        Constant Field Values

    - #### SAML_CLIENT_SIGNATURE_ATTRIBUTE

          public static final String SAML_CLIENT_SIGNATURE_ATTRIBUTE

      See Also:
        Constant Field Values

    - #### LOGIN_PROTOCOL

          public static final String LOGIN_PROTOCOL

      See Also:
        Constant Field Values

    - #### SAML_BINDING

          public static final String SAML_BINDING

      See Also:
        Constant Field Values

    - #### SAML_POST_BINDING

          public static final String SAML_POST_BINDING

      See Also:
        Constant Field Values

    - #### SAML_GET_BINDING

          public static final String SAML_GET_BINDING

      See Also:
        Constant Field Values

    - #### SAML_SERVER_SIGNATURE

          public static final String SAML_SERVER_SIGNATURE

      See Also:
        Constant Field Values

    - #### SAML_ASSERTION_SIGNATURE

          public static final String SAML_ASSERTION_SIGNATURE

      See Also:
        Constant Field Values

    - #### SAML_AUTHNSTATEMENT

          public static final String SAML_AUTHNSTATEMENT

      See Also:
        Constant Field Values

    - #### SAML_MULTIVALUED_ROLES

          public static final String SAML_MULTIVALUED_ROLES

      See Also:
        Constant Field Values

    - #### SAML_SIGNATURE_ALGORITHM

          public static final String SAML_SIGNATURE_ALGORITHM

      See Also:
        Constant Field Values

    - #### SAML_ENCRYPT

          public static final String SAML_ENCRYPT

      See Also:
        Constant Field Values

    - #### SAML_FORCE_POST_BINDING

          public static final String SAML_FORCE_POST_BINDING

      See Also:
        Constant Field Values

    - #### SAML_REQUEST_ID

          public static final String SAML_REQUEST_ID

      See Also:
        Constant Field Values

    - #### session

          protected KeycloakSession session

    - #### realm

          protected RealmModel realm

    - #### uriInfo

          protected javax.ws.rs.core.UriInfo uriInfo

  - ### Constructor Detail

    - #### SamlProtocol

          public SamlProtocol()

  - ### Method Detail

    - #### setSession

          public SamlProtocol setSession(KeycloakSession session)

      Specified by:
        `setSession` in interface `LoginProtocol`

    - #### setRealm

          public SamlProtocol setRealm(RealmModel realm)

      Specified by:
        `setRealm` in interface `LoginProtocol`

    - #### setUriInfo

          public SamlProtocol setUriInfo(javax.ws.rs.core.UriInfo uriInfo)

      Specified by:
        `setUriInfo` in interface `LoginProtocol`

    - #### cancelLogin

          public javax.ws.rs.core.Response cancelLogin(ClientSessionModel clientSession)

      Specified by:
        `cancelLogin` in interface `LoginProtocol`

    - #### invalidSessionError

          public javax.ws.rs.core.Response invalidSessionError(ClientSessionModel clientSession)

      Specified by:
        `invalidSessionError` in interface `LoginProtocol`

    - #### getResponseIssuer

          protected String getResponseIssuer(RealmModel realm)

    - #### getErrorResponse

          protected javax.ws.rs.core.Response getErrorResponse(ClientSessionModel clientSession,
                                                   String status)

    - #### isPostBinding

          protected boolean isPostBinding(ClientSessionModel clientSession)

    - #### authenticated

          public javax.ws.rs.core.Response authenticated(UserSessionModel userSession,
                                                ClientSessionCode accessCode)

      Specified by:
        `authenticated` in interface `LoginProtocol`

    - #### getSignatureAlgorithm

          public static SignatureAlgorithm getSignatureAlgorithm(ClientModel client)

    - #### initClaims

          public void initClaims(SALM2LoginResponseBuilder builder,
                        ClientModel model,
                        UserModel user)

    - #### consentDenied

          public javax.ws.rs.core.Response consentDenied(ClientSessionModel clientSession)

      Specified by:
        `consentDenied` in interface `LoginProtocol`

    - #### backchannelLogout

          public void backchannelLogout(UserSessionModel userSession,
                               ClientSessionModel clientSession)

      Specified by:
        `backchannelLogout` in interface `LoginProtocol`

    - #### close

          public void close()

      Specified by:
        `close` in interface `Provider`

Copyright © 2014. All Rights Reserved.