rubicon

package
v0.12.17 Latest Latest
Warning

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

Go to latest
Published: May 28, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRubicon

func NewRubicon(r *http.Request) ident.Ident

NewRubicon checks requests and returns an ident.Ident

Types

type IdmUser

type IdmUser struct {
	UserID    int    `json:"userId"`
	UserName  string `json:"userName"`
	Email     string `json:"email"`
	FirstName string `json:"firstName"`
	LastName  string `json:"lastName"`
}

IdmUser is the responce from rubicon api

type User

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

User implements the ident.Ident interface

func (User) GetAspect

func (u User) GetAspect() string

GetAspect returns aspect

func (User) GetDisplay

func (u User) GetDisplay() string

GetDisplay returns human friendly name

func (User) GetGroups

func (u User) GetGroups() []string

GetGroups returns empty list

func (User) GetIdentity

func (u User) GetIdentity() string

GetIdentity returns username

func (User) GetMeta

func (u User) GetMeta() map[string]string

GetMeta returns empty list

func (User) GetRoles

func (u User) GetRoles() []string

GetRoles returns empty list

func (User) HasGroup

func (u User) HasGroup(g ...string) bool

HasGroup returns bool for tested groups

func (User) HasRole

func (u User) HasRole(r ...string) bool

HasRole returns bool for tested roles

func (User) IsActive

func (u User) IsActive() bool

IsActive returns bool for logged in state

Jump to

Keyboard shortcuts

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