Helper class for providing single sign on integration with Discourse.
How the SSO works:
1. User clicks "Login" on your site while your site has sso enabled.
2. User is redirected to the link you have provided in the Discourse SSO settings.
Using SSOProvider, you verify the incoming SSO request(via the configured SSO secret),
then you authenticate the user that is trying to log in(by letting them log in
to your system or by using their existing session in your system).
3. You get the user information for the authenticated user, and use SSOProvider
to build a query string that will be sent back to discourse/session/sso_login
For example:
val ctx: SSOContext = ???
val req: SSOUserRequest = ???
val sso = new SSOProvider(ctx).generate(req)
val discourseSite = "http://discourse.example.com"// use redirectUrl to authenticate to your discourseSiteval redirectUrl = s"${discourseSite}/session/sso_login?sso=${sso.payload}&sig=${sso.signature}"
This member is added by an implicit conversion from SSOProvider to
ArrowAssoc[SSOProvider] performed by method any2ArrowAssoc in scala.Predef.
Definition Classes
ArrowAssoc
Shadowed Implicit Value Members
valself: Any
Implicit information
This member is added by an implicit conversion from SSOProvider to
StringAdd performed by method any2stringadd in scala.Predef.
Shadowing
This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error. To access this member you can use a type ascription:
(sSOProvider: StringAdd).self
Definition Classes
StringAdd
valself: Any
Implicit information
This member is added by an implicit conversion from SSOProvider to
StringFormat performed by method any2stringfmt in scala.Predef.
Shadowing
This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error. To access this member you can use a type ascription:
This member is added by an implicit conversion from SSOProvider to
ArrowAssoc[SSOProvider] performed by method any2ArrowAssoc in scala.Predef.
Shadowing
This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error. To access this member you can use a type ascription:
This member is added by an implicit conversion from SSOProvider to
Ensuring[SSOProvider] performed by method any2Ensuring in scala.Predef.
Shadowing
This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error. To access this member you can use a type ascription:
(sSOProvider: Ensuring[SSOProvider]).x
Definition Classes
Ensuring
Annotations
@deprecated
Deprecated
(Since version 2.10.0) Use resultOfEnsuring instead
Inherited from AnyRef
Inherited from Any
Inherited by implicit conversion any2stringadd from
SSOProvider to StringAdd
Inherited by implicit conversion any2stringfmt from
SSOProvider to StringFormat
Inherited by implicit conversion any2ArrowAssoc from
SSOProvider to ArrowAssoc[SSOProvider]
Helper class for providing single sign on integration with Discourse.
How the SSO works:
1. User clicks "Login" on your site while your site has sso enabled.
2. User is redirected to the link you have provided in the Discourse SSO settings. Using SSOProvider, you verify the incoming SSO request(via the configured SSO secret), then you authenticate the user that is trying to log in(by letting them log in to your system or by using their existing session in your system).
3. You get the user information for the authenticated user, and use SSOProvider to build a query string that will be sent back to discourse/session/sso_login
For example:
Discourse for more information