xj      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghi3Helpers for swagger deriving without name prefixes.(c) Anton Gushcha, 2016MITncrashed@gmail.com experimentalPortableNone(035>CIKLNStrip given prefix from fields1Helpers for aeson deriving without name prefixes.(c) Anton Gushcha, 2016MITncrashed@gmail.com experimentalPortableNone(035>CIKLN2For aeson deriving, drop prefix t and map to lowerjkjk(Helpers for response pagination support.(c) Anton Gushcha, 2016MITncrashed@gmail.com experimentalPortableNone(035>CIKLNCollection of a with attached ids of type i and additional page info.PayloadCount of available pagesNumber of items on a page7Query parameter that carries pagination page size value  A page number 3Query parameter that carries pagination page number  lmnop    lmnop"API for token based authorisation.(c) Anton Gushcha, 2016MITncrashed@gmail.com experimentalPortableNone(035>CIKLN> "Request body for user registrationId of user group"Id of user that is used in the APIToken header that we require for authorization marked by permissions that are expected from the token to pass guarding functions.;Simplified version that takes plain symbols as permissions.Token header that we require for authorization marked by permissions that are expected from the token to pass guarding functions.+Single use code used for authorisation via ] and \ endpoints!Special tag for password restore Amount of seconds,Special tag for a permission that a user has User emailPassword for loginUser name for login2Shortcut for Maybe Token with attached permissions;Simplified version that takes plain symbols as permissions.2Shortcut for Maybe Token with attached permissions9Token that doesn't have attached compile-time permissions jToken is simple string marked by permissions that are expected from the token to pass guarding functions.;Simplified version that takes plain symbols as permissions.!jToken is simple string marked by permissions that are expected from the token to pass guarding functions.$,Helper type family to wrap all symbols into (%4Convertation of permission symbol into runtim string'OType level permission type that allows to construct complex permission labels*Response with user info1'Response with users info and pagination5Request body for patching user<lData of user group, groups allows to group permissions and assign them to particular users in batch manner.%Also a group hierarchy can be formed.B Data type that is used to patch <H,Special case when you want to set parent to qrKCheck that first set of permissions is subset of second, throw error if nots.Foldl type level list of bools, identicall to tu7Check that first set of permissions is subset of secondvCheck whether a b$ is contained in permission list of aIDUnlifting compile-time permissions into list of run-time permissionsK"Get list of user groups, requires c for token L1Delete all info about given user group, requires e for tokenM,Patch info about given user group, requires d for tokenN.Replace info about given user group, requires d for tokenO#Inserting new user group, requires d for tokenP(Getting info about user group, requires c for tokenQaGenerate single usage codes that user can write down and use later for emergency authorisation.qz for "codes-count" parameter means some default value defined by server. Server can restrict maximum count of such codes.LServer should invalidate previous codes on subsequent calls of the endpoint.Special authorisation tag can be used to disable the feature, merely don't give the tag to users and they won't be able to generate codes. See also: \ for utilisation of the codes.RZGenerate new password for user. There is two phases, first, the method is called without code parameter. The system sends email with a restore code to user email or sms (its depends on server). After that a call of the method with the code is needed to change password.SDelete user from DB, requires e< and will cause cascade deletion, that is your usually wantT1Replace user with the user in the body, requires d for tokenUUpdating loginemailpassword, requires d for tokenV"Getting info about user, requires c for tokenW$Getting list of all users, requires c for tokenXCreation of new user, requires b for tokenYJClose session, after call of the method the token in header is not valid.Z+Get client info that is binded to the token[AClient cat expand the token lifetime, no permissions are required\'Authorisation via code of single usage.*Logic of authorisation via this method is:Client sends GET request to ] endpointcServer generates single use token and sends it via SMS or email (server specific implementation)Client sends POST request to \ endpoint Server responds with auth token.BClient uses the token with other requests as authorisation header@Client can extend lifetime of token by periodically pinging of [ endpoint)Client can invalidate token instantly by Y$Client can get info about user with Z endpoint.]'Authorisation via code of single usage.*Logic of authorisation via this method is:Client sends GET request to ] endpointcServer generates single use token and sends it via SMS or email (server specific implementation)Client sends POST request to \ endpoint Server responds with auth token.BClient uses the token with other requests as authorisation header@Client can extend lifetime of token by periodically pinging of [ endpoint)Client can invalidate token instantly by Y$Client can get info about user with Z endpoint.^How to get a token, expire of q, means some default value (server config).*Logic of authorisation via this method is:dClient sends GET request to the endpoint with user specified login and password and optional expire#Server responds with token or errorBClient uses the token with other requests as authorisation header@Client can extend lifetime of token by periodically pinging of [ endpoint)Client can invalidate token instantly by Y$Client can get info about user with Z endpoint._Generic authorization API`aProxy type for auth API, used to pass the type-level info into client/docs generation functionsa,Permission that allows everything by defaultb0Permission that allows registration of new usersc6Permission that allows to query info about other usersd2Permission that allows to update fields of an usereAPermission that allows to delete users and cause cascade deletionf&Select only operations of the Auth APIg Servant.Docs documentation of the Auth APIh:Cast token to permissions that are lower than original one=The cast is safe, the permissions are cheked on compile time.i;Cast token to permissions that are lower than original one.=The cast is safe, the permissions are cheked on compile time.  !"#$%&'()wxyz{|}*+,-./0~123456789:;<=>?@ABCDEFGHrsuvIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghi_  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghi__^]\[ZYXWVUTSRQPONMLK`g'()%&IJ$!"# hi *+,-./056789:;1234<=>?@ABCDEFGHabcdefb   !"#$%&'()wxyz{|}*+,-./0~123456789:;<=>?@ABCDEFGHrsuvIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghi       !"#$%&&'()*+,-../012344567789:;<==>?@ABBCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstpuvwxyz{|}~klBLcChwJMF7C8Iz6KSAzIyi*Servant.API.Auth.Token.Internal.DeriveJson&Servant.API.Auth.Token.Internal.Schema!Servant.API.Auth.Token.PaginationServant.API.Auth.Token7EdpokxwdtqGQMwV9mipxo Data.Aeson.TH deriveJSONschemaOptionsDropPrefix derivePrefix PagedListpagedListItemspagedListPagesPageSize PageSizeParamPage PageParam ReqRegister reqRegLoginreqRegPassword reqRegEmailreqRegPermissions reqRegGroups UserGroupIdUserId TokenHeader' TokenHeader SingleUseCode RestoreCodeSeconds PermissionEmailPasswordLoginMToken'MToken SimpleTokenToken'TokenunToken PlainPermsUnliftPermSymbolunliftPermSymbol PermSymbol PermLabel PermConcat RespUserInfo respUserId respUserLogin respUserEmailrespUserPermissionsrespUserGroups RespUsersInforespUsersItemsrespUsersPages PatchUserpatchUserLoginpatchUserPasswordpatchUserEmailpatchUserPermissionspatchUserGroups UserGroup userGroupNameuserGroupUsersuserGroupPermissionsuserGroupParentPatchUserGrouppatchUserGroupNamepatchUserGroupUserspatchUserGroupPermissionspatchUserGroupParentpatchUserGroupNoParent PermsList unliftPermsAuthGroupsMethodAuthDeleteGroupMethodAuthPatchGroupMethodAuthPutGroupMethodAuthPostGroupMethodAuthGetGroupMethodAuthGetSingleUseCodesAuthRestoreMethodAuthDeleteUserMethodAuthPutUserMethodAuthPatchUserMethodAuthGetUserMethodAuthUsersMethodAuthSignupMethodAuthSignoutMethodAuthTokenInfoMethodAuthTouchMethodAuthSigninPostCodeMethodAuthSigninGetCodeMethodAuthSigninMethodAuthAPIauthAPI adminPerm registerPerm authInfoPermauthUpdatePermauthDeletePermauthOperationsauthDocsdowngradeToken'downgradeTokenmapFirstcamelCaseToDash$fToParam*QueryParam$fToParam*QueryParam0$fToSamplePagedList$fToSchemaPagedList$fFromJSONPagedListbaseGHC.BaseNothing PermsSubsetTAll Data.FoldableandConatinAllPerm ContainPerm$fToSampleToken$fToHttpApiDataToken$fFromHttpApiDataToken$fToParamSchemaToken$fUnliftPermSymbolPermConcat$fUnliftPermSymbolPermLabel$fToSampleUnit$fToSampleReqRegister$fToSchemaReqRegister$fFromJSONReqRegister$fToSampleRespUserInfo$fToSchemaRespUserInfo$fFromJSONRespUserInfo$fToSampleRespUsersInfo$fToSchemaRespUsersInfo$fFromJSONRespUsersInfo$fToSamplePatchUser$fToSchemaPatchUser$fFromJSONPatchUser$fToSampleUserGroup$fToSchemaUserGroup$fFromJSONUserGroup $fPermsList: $fPermsList[] $fToSample()$fToSampleText$fToSampleWord$fToCapture*Capture$fToCapture*Capture0$fToParam*QueryParam1$fToParam*QueryParam2$fToParam*QueryParam3$fToSamplePatchUserGroup$fToSchemaPatchUserGroup$fFromJSONPatchUserGroup