class DefaultSocialStateHandler extends SocialStateHandler
The base implementation of the SocialStateHandler.
- Alphabetic
- By Inheritance
- DefaultSocialStateHandler
- SocialStateHandler
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new DefaultSocialStateHandler(handlers: Set[SocialStateItemHandler], signer: Signer)
- handlers
The item handlers configured for this handler.
- signer
The signer implementation to sign the state.
Type Members
- type Self = DefaultSocialStateHandler
The concrete instance of the state provider.
The concrete instance of the state provider.
- Definition Classes
- DefaultSocialStateHandler → SocialStateHandler
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @HotSpotIntrinsicCandidate() @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- val handlers: Set[SocialStateItemHandler]
The item handlers configured for this handler
The item handlers configured for this handler
- Definition Classes
- DefaultSocialStateHandler → SocialStateHandler
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- def publish[B](result: Result, state: SocialState)(implicit request: ExtractableRequest[B]): Result
Publishes the state to the client.
Publishes the state to the client.
- B
The type of the request body.
- result
The result to send to the client.
- state
The state to publish.
- request
The current request.
- returns
The result to send to the client.
- Definition Classes
- DefaultSocialStateHandler → SocialStateHandler
- See also
- def serialize(state: SocialState): String
Serializes the given state into a single state value which can be passed with the state param.
Serializes the given state into a single state value which can be passed with the state param.
If no handler is registered on the provider then we omit state signing, because it makes no sense the sign an empty state.
- state
The social state to serialize.
- returns
The serialized state as string.
- Definition Classes
- DefaultSocialStateHandler → SocialStateHandler
- def state(implicit ec: ExecutionContext): Future[SocialState]
Gets the social state for all handlers.
Gets the social state for all handlers.
- ec
The execution context to handle the asynchronous operations.
- returns
The social state for all handlers.
- Definition Classes
- DefaultSocialStateHandler → SocialStateHandler
- Annotations
- @SuppressWarnings()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- def unserialize[B](state: String)(implicit request: ExtractableRequest[B], ec: ExecutionContext): Future[SocialState]
Unserializes the social state from the state param.
Unserializes the social state from the state param.
If no handler is registered on the provider then we omit the state validation. This is needed in some cases where the authentication process was started from a client side library and not from Silhouette.
- B
The type of the request body.
- state
The state to unserialize.
- request
The request to read the value of the state param from.
- ec
The execution context to handle the asynchronous operations.
- returns
The social state on success, an error on failure.
- Definition Classes
- DefaultSocialStateHandler → SocialStateHandler
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- def withHandler(handler: SocialStateItemHandler): DefaultSocialStateHandler
Creates a copy of the state provider with a new handler added.
Creates a copy of the state provider with a new handler added.
There exists two types of state handlers. The first type are global state handlers which can be configured by the user with the help of a configuration mechanism or through dependency injection. And there a local state handlers which are provided by the application itself. This method exists to handle the last type of state handlers, because it allows to extend the list of user defined state handlers from inside the library.
- handler
The handler to add.
- returns
A new state provider with a new handler added.
- Definition Classes
- DefaultSocialStateHandler → SocialStateHandler
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated
(Since version 9)