uaaapi

package
v0.38.3 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2024 License: MPL-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthManager

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

AuthManager -

func NewAuthManager

func NewAuthManager(gateway net.Gateway, config coreconfig.ReadWriter, dumper net.RequestDumper) *AuthManager

NewAuthManager -

func (*AuthManager) Authenticate

func (tm *AuthManager) Authenticate(credentials map[string]string) error

Authenticate -

func (*AuthManager) Authorize

func (tm *AuthManager) Authorize(token string) (string, error)

Authorize -

func (*AuthManager) DumpRequest

func (tm *AuthManager) DumpRequest(req *http.Request)

DumpRequest -

func (*AuthManager) DumpResponse

func (tm *AuthManager) DumpResponse(res *http.Response)

DumpResponse -

func (*AuthManager) GetClientToken

func (tm *AuthManager) GetClientToken(clientID, clientSecret string) (clientToken string, err error)

GetClientToken -

func (*AuthManager) RefreshToken

func (tm *AuthManager) RefreshToken() (string, error)

RefreshToken -

type ClientManager

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

ClientManager -

func (*ClientManager) ChangeSecret

func (cm *ClientManager) ChangeSecret(id, oldSecret, newSecret string) (err error)

ChangeSecret - Change the password/secret

func (*ClientManager) Create

func (cm *ClientManager) Create(nCli UAAClient) (client UAAClient, err error)

Create - Create a client

func (*ClientManager) DeleteClient

func (cm *ClientManager) DeleteClient(id string) (err error)

DeleteClient -

func (*ClientManager) FindByClientID

func (cm *ClientManager) FindByClientID(clientID string) (client UAAClient, err error)

FindByClientID -

func (*ClientManager) GetClient

func (cm *ClientManager) GetClient(id string) (client *UAAClient, err error)

GetClient -

func (*ClientManager) UaaEndPoint

func (cm *ClientManager) UaaEndPoint() string

func (*ClientManager) UpdateClient

func (cm *ClientManager) UpdateClient(nCli *UAAClient) (client UAAClient, err error)

UpdateClient -

type GroupManager

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

func (*GroupManager) FindByDisplayName

func (gm *GroupManager) FindByDisplayName(displayName string) (group UAAGroup, err error)

type Logger

type Logger struct {
	UI terminal.UI

	TracePrinter trace.Printer
	// contains filtered or unexported fields
}

Logger -

func NewLogger

func NewLogger(debug bool, tracePath string) *Logger

NewLogger -

func (*Logger) DebugMessage

func (l *Logger) DebugMessage(format string, v ...interface{})

DebugMessage -

func (*Logger) LogMessage

func (l *Logger) LogMessage(format string, v ...interface{})

LogMessage -

type Session

type Session struct {
	Log *Logger
	// contains filtered or unexported fields
}

Session - wraps the CF CLI session objects

func NewSession

func NewSession(
	uaaLoginEndpoint, uaaAuthEndpoint,
	uaaClientID, uaaClientSecret, caCert string,
	skipSslValidation bool) (s *Session, err error)

NewSession -

func (*Session) AuthManager

func (s *Session) AuthManager() *AuthManager

AuthManager -

func (*Session) ClientManager

func (s *Session) ClientManager() *ClientManager

ClientManager -

func (*Session) GroupManager

func (s *Session) GroupManager() *GroupManager

GroupManager -

func (*Session) UserManager

func (s *Session) UserManager() *UserManager

UserManager -

type UAAClient

type UAAClient struct {
	ClientID             string   `json:"client_id,omitempty"`
	ClientSecret         string   `json:"client_secret,omitempty"`
	AuthorizedGrantTypes []string `json:"authorized_grant_types,omitempty"`
	RedirectURI          []string `json:"redirect_uri,omitempty"`
	Scope                []string `json:"scope,omitempty"`
	ResourceIds          []string `json:"resource_ids,omitempty"`
	Authorities          []string `json:"authorities,omitempty"`
	Autoapprove          []string `json:"autoapprove,omitempty"`
	AccessTokenValidity  int      `json:"access_token_validity,omitempty"`
	RefreshTokenValidity int      `json:"refresh_token_validity,omitempty"`
	Allowedproviders     []string `json:"allowedproviders,omitempty"`
	Name                 string   `json:"name,omitempty"`
	TokenSalt            string   `json:"token_salt,omitempty"`
	CreatedWith          string   `json:"createdwith,omitempty"`
	ApprovalsDeleted     bool     `json:"approvals_deleted,omitempty"`
	RequiredUserGroups   []string `json:"required_user_groups,omitempty"`
	LastModified         int64    `json:"lastModified,omitempty"`
}

UAAClient -

func (*UAAClient) HasDefaultAuthorites

func (c *UAAClient) HasDefaultAuthorites() bool

func (*UAAClient) HasDefaultResourceIds

func (c *UAAClient) HasDefaultResourceIds() bool

func (*UAAClient) HasDefaultScope

func (c *UAAClient) HasDefaultScope() bool

type UAAClientResourceList

type UAAClientResourceList struct {
	Resources []UAAClient `json:"resources"`
}

UAAClientResourceList -

type UAAGroup

type UAAGroup struct {
	ID          string `json:"id,omitempty"`
	DisplayName string `json:"displayName,omitempty"`
	Description string `json:"description,omitempty"`
	ZoneId      string `json:"zoneId,omitempty"`
}

type UAAGroupResourceList

type UAAGroupResourceList struct {
	Resources []UAAGroup `json:"resources"`
}

type UAAUser

type UAAUser struct {
	ID       string `json:"id,omitempty"`
	Username string `json:"userName,omitempty"`
	Password string `json:"password,omitempty"`
	Origin   string `json:"origin,omitempty"`

	Name   UAAUserName    `json:"name,omitempty"`
	Emails []UAAUserEmail `json:"emails,omitempty"`
	Groups []UAAUserGroup `json:"groups,omitempty"`
}

UAAUser -

type UAAUserEmail

type UAAUserEmail struct {
	Value string `json:"value"`
}

UAAUserEmail -

type UAAUserGroup

type UAAUserGroup struct {
	Value   string `json:"value"`
	Display string `json:"display"`
	Type    string `json:"type"`
}

UAAUserGroup -

type UAAUserName

type UAAUserName struct {
	GivenName  string `json:"givenName"`
	FamilyName string `json:"familyName"`
}

UAAUserName -

type UAAUserResourceList

type UAAUserResourceList struct {
	Resources []UAAUser `json:"resources"`
}

UAAUserResourceList -

type UserManager

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

UserManager -

func (*UserManager) ChangePassword

func (um *UserManager) ChangePassword(
	id, oldPassword, newPassword string) (err error)

ChangePassword -

func (*UserManager) CreateUser

func (um *UserManager) CreateUser(
	username, password, origin, givenName, familyName, email string) (user UAAUser, err error)

CreateUser -

func (*UserManager) DeleteUser

func (um *UserManager) DeleteUser(id string) (err error)

DeleteUser -

func (*UserManager) FindByUsername

func (um *UserManager) FindByUsername(username string) (user UAAUser, err error)

FindByUsername -

func (*UserManager) GetUser

func (um *UserManager) GetUser(id string) (user *UAAUser, err error)

GetUser -

func (*UserManager) IsDefaultGroup

func (um *UserManager) IsDefaultGroup(group string) (ok bool)

IsDefaultGroup -

func (*UserManager) UpdateRoles

func (um *UserManager) UpdateRoles(
	id string, scopesToDelete, scopesToAdd []string, origin string) (err error)

UpdateRoles -

func (*UserManager) UpdateUser

func (um *UserManager) UpdateUser(
	id, username, givenName, familyName, email string) (user *UAAUser, err error)

UpdateUser -

Jump to

Keyboard shortcuts

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