identityservice

package
v0.0.0-...-d3d53d6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 23, 2016 License: BSD-3-Clause Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCookieSecret

func GetCookieSecret() string

GetCookieSecret gets the cookie secret from mongodb if it exists otherwise, generate a new one and save it

func GetOauthClientID

func GetOauthClientID(service string) (string, error)

GetOauthClientID gets the oauth secret from mongodb for a specified service. If it doesn't exist, an error gets logged.

func GetOauthSecret

func GetOauthSecret(service string) (string, error)

GetOauthSecret gets the oauth secret from mongodb for a specified service. If it doesn't exist, an error gets logged.

Types

type Service

type Service struct {
	// contains filtered or unexported fields
}

Service is the identityserver http service

func NewService

func NewService(smsService communication.SMSService, emailService communication.EmailService) (service *Service)

NewService creates and initializes a Service

func (*Service) AddRoutes

func (service *Service) AddRoutes(router *mux.Router)

AddRoutes registers the http routes with the router.

func (*Service) FilterAuthorizedScopes

func (service *Service) FilterAuthorizedScopes(r *http.Request, username string, grantedTo string, requestedscopes []string) (authorizedScopes []string, err error)

FilterAuthorizedScopes filters the requested scopes to the ones that are authorizated, if no authorization exists, authorizedScops is nil

func (*Service) FilterPossibleScopes

func (service *Service) FilterPossibleScopes(r *http.Request, username string, requestedScopes []string, allowInvitations bool) (possibleScopes []string, err error)

FilterPossibleScopes filters the requestedScopes to the relevant ones that are possible For example, a `user:memberof:orgid1` is not possible if the user is not a member the `orgid1` organization and there is no outstanding invite for this organization If allowInvitations is true, invitations to organizations allows the "user:memberof:organization" as possible scopes

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL