yesod-auth-1.6.11.3: Authentication for Yesod.

Safe Haskell | None
Language | Haskell2010

Yesod.Auth.OpenId

Synopsis

- authOpenId :: YesodAuth master => IdentifierType -> [(Text, Text)] -> AuthPlugin master
- forwardUrl :: AuthRoute
- claimedKey :: Text
- opLocalKey :: Text
- credsIdentClaimed :: Creds m -> Text
- data IdentifierType
  - = Claimed
  - | OPLocal

# Documentation

authOpenId Source #

Arguments

:: YesodAuth master |
=> IdentifierType |
-> [(Text, Text)] | extension fields
-> AuthPlugin master |

forwardUrl :: AuthRoute Source #

claimedKey :: Text Source #

The main identifier provided by the OpenID authentication plugin is the "OP-local identifier". There is also sometimes a "claimed" identifier available.

In the `credsExtra` field of the `Creds` datatype, you can lookup this key to find the claimed identifier, if available.

    let finalID = fromMaybe (credsIdent creds)
                $ lookup claimedKey (credsExtra creds)

Since 1.0.2

opLocalKey :: Text Source #

credsIdentClaimed :: Creds m -> Text Source #

A helper function which will get the claimed identifier, if available, falling back to the OP local identifier.

See `claimedKey`.

Since 1.0.2

data IdentifierType Source #

Constructors

Claimed |
OPLocal |