openid-connect-0.2.0: An OpenID Connect library that does all the heavy lifting for you
CopyrightThis file is part of the package openid-connect. It is subject to
the license terms in the LICENSE file found in the top-level
directory of this distribution and at:

https://code.devalot.com/open/openid-connect

No part of this package including this file may be copied
modified propagated or distributed except according to the terms
contained in the LICENSE file.
LicenseBSD-2-Clause
Safe HaskellSafe-Inferred
LanguageHaskell2010

OpenID.Connect.Scope

Contents

Description

Scope values, defined in OAuth 2.0, as used in OpenID Connect 1.0.

Synopsis

Documentation

data Scope Source #

A list of scope values.

To create a scope value use the IsString instance or one of the helper functions such as openid or email.

Since: 0.1.0.0

Instances

Instances details
FromJSON Scope Source # 
Instance details

Defined in OpenID.Connect.Scope

ToJSON Scope Source # 
Instance details

Defined in OpenID.Connect.Scope

IsString Scope Source # 
Instance details

Defined in OpenID.Connect.Scope

Methods

fromString :: String -> Scope #

Semigroup Scope Source # 
Instance details

Defined in OpenID.Connect.Scope

Methods

(<>) :: Scope -> Scope -> Scope #

sconcat :: NonEmpty Scope -> Scope #

stimes :: Integral b => b -> Scope -> Scope #

Generic Scope Source # 
Instance details

Defined in OpenID.Connect.Scope

Associated Types

type Rep Scope :: Type -> Type #

Methods

from :: Scope -> Rep Scope x #

to :: Rep Scope x -> Scope #

Show Scope Source # 
Instance details

Defined in OpenID.Connect.Scope

Methods

showsPrec :: Int -> Scope -> ShowS #

show :: Scope -> String #

showList :: [Scope] -> ShowS #

type Rep Scope Source # 
Instance details

Defined in OpenID.Connect.Scope

type Rep Scope = D1 ('MetaData "Scope" "OpenID.Connect.Scope" "openid-connect-0.2.0-9NUCQOfqK7L3ZMFQIg1Sgd" 'True) (C1 ('MetaCons "Scope" 'PrefixI 'True) (S1 ('MetaSel ('Just "unScope") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Words)))

openid :: Scope Source #

The openid scope.

Redundant since the openid scope is always added to requests.

Since: 0.1.0.0

email :: Scope Source #

The email scope.

Since: 0.1.0.0

profile :: Scope Source #

The profile scope.

Since: 0.1.0.0

auth :: Scope Source #

Authentication request scope.

Equivalent to openid <> email.

Since: 0.1.0.0

hasScope :: Scope -> Text -> Bool Source #

Test to see if the given scope includes a specific scope value.

Since: 0.1.0.0

scopeFromWords :: Words -> Scope Source #

Convert a (non-empty) list of words into a Scope.

Since: 0.1.0.0

scopeQueryItem :: Scope -> QueryItem Source #

Encode a Scope into a query string item.

Since: 0.1.0.0

Re-exports

newtype Words Source #

Space separated list of words.

Since: 0.1.0.0

Constructors

Words 

Instances

Instances details
FromJSON Words Source # 
Instance details

Defined in OpenID.Connect.JSON

ToJSON Words Source # 
Instance details

Defined in OpenID.Connect.JSON

Semigroup Words Source # 
Instance details

Defined in OpenID.Connect.JSON

Methods

(<>) :: Words -> Words -> Words #

sconcat :: NonEmpty Words -> Words #

stimes :: Integral b => b -> Words -> Words #

Generic Words Source # 
Instance details

Defined in OpenID.Connect.JSON

Associated Types

type Rep Words :: Type -> Type #

Methods

from :: Words -> Rep Words x #

to :: Rep Words x -> Words #

Show Words Source # 
Instance details

Defined in OpenID.Connect.JSON

Methods

showsPrec :: Int -> Words -> ShowS #

show :: Words -> String #

showList :: [Words] -> ShowS #

type Rep Words Source # 
Instance details

Defined in OpenID.Connect.JSON

type Rep Words = D1 ('MetaData "Words" "OpenID.Connect.JSON" "openid-connect-0.2.0-9NUCQOfqK7L3ZMFQIg1Sgd" 'True) (C1 ('MetaCons "Words" 'PrefixI 'True) (S1 ('MetaSel ('Just "toWordList") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (NonEmpty Text))))

toWords :: MonadPlus m => Text -> m Words Source #

Decode a list of words from Text.

Since: 0.1.0.0

fromWords :: Words -> Text Source #

Encode a list of words into Text.

Since: 0.1.0.0