oidc

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OIDCService_GetAuthRequest_FullMethodName = "/zitadel.oidc.v2beta.OIDCService/GetAuthRequest"
	OIDCService_CreateCallback_FullMethodName = "/zitadel.oidc.v2beta.OIDCService/CreateCallback"
)

Variables

View Source
var (
	Prompt_name = map[int32]string{
		0: "PROMPT_UNSPECIFIED",
		1: "PROMPT_NONE",
		2: "PROMPT_LOGIN",
		3: "PROMPT_CONSENT",
		4: "PROMPT_SELECT_ACCOUNT",
		5: "PROMPT_CREATE",
	}
	Prompt_value = map[string]int32{
		"PROMPT_UNSPECIFIED":    0,
		"PROMPT_NONE":           1,
		"PROMPT_LOGIN":          2,
		"PROMPT_CONSENT":        3,
		"PROMPT_SELECT_ACCOUNT": 4,
		"PROMPT_CREATE":         5,
	}
)

Enum value maps for Prompt.

View Source
var (
	ErrorReason_name = map[int32]string{
		0:  "ERROR_REASON_UNSPECIFIED",
		1:  "ERROR_REASON_INVALID_REQUEST",
		2:  "ERROR_REASON_UNAUTHORIZED_CLIENT",
		3:  "ERROR_REASON_ACCESS_DENIED",
		4:  "ERROR_REASON_UNSUPPORTED_RESPONSE_TYPE",
		5:  "ERROR_REASON_INVALID_SCOPE",
		6:  "ERROR_REASON_SERVER_ERROR",
		7:  "ERROR_REASON_TEMPORARY_UNAVAILABLE",
		8:  "ERROR_REASON_INTERACTION_REQUIRED",
		9:  "ERROR_REASON_LOGIN_REQUIRED",
		10: "ERROR_REASON_ACCOUNT_SELECTION_REQUIRED",
		11: "ERROR_REASON_CONSENT_REQUIRED",
		12: "ERROR_REASON_INVALID_REQUEST_URI",
		13: "ERROR_REASON_INVALID_REQUEST_OBJECT",
		14: "ERROR_REASON_REQUEST_NOT_SUPPORTED",
		15: "ERROR_REASON_REQUEST_URI_NOT_SUPPORTED",
		16: "ERROR_REASON_REGISTRATION_NOT_SUPPORTED",
	}
	ErrorReason_value = map[string]int32{
		"ERROR_REASON_UNSPECIFIED":                0,
		"ERROR_REASON_INVALID_REQUEST":            1,
		"ERROR_REASON_UNAUTHORIZED_CLIENT":        2,
		"ERROR_REASON_ACCESS_DENIED":              3,
		"ERROR_REASON_UNSUPPORTED_RESPONSE_TYPE":  4,
		"ERROR_REASON_INVALID_SCOPE":              5,
		"ERROR_REASON_SERVER_ERROR":               6,
		"ERROR_REASON_TEMPORARY_UNAVAILABLE":      7,
		"ERROR_REASON_INTERACTION_REQUIRED":       8,
		"ERROR_REASON_LOGIN_REQUIRED":             9,
		"ERROR_REASON_ACCOUNT_SELECTION_REQUIRED": 10,
		"ERROR_REASON_CONSENT_REQUIRED":           11,
		"ERROR_REASON_INVALID_REQUEST_URI":        12,
		"ERROR_REASON_INVALID_REQUEST_OBJECT":     13,
		"ERROR_REASON_REQUEST_NOT_SUPPORTED":      14,
		"ERROR_REASON_REQUEST_URI_NOT_SUPPORTED":  15,
		"ERROR_REASON_REGISTRATION_NOT_SUPPORTED": 16,
	}
)

Enum value maps for ErrorReason.

View Source
var File_zitadel_oidc_v2beta_authorization_proto protoreflect.FileDescriptor
View Source
var File_zitadel_oidc_v2beta_oidc_service_proto protoreflect.FileDescriptor
View Source
var OIDCService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "zitadel.oidc.v2beta.OIDCService",
	HandlerType: (*OIDCServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetAuthRequest",
			Handler:    _OIDCService_GetAuthRequest_Handler,
		},
		{
			MethodName: "CreateCallback",
			Handler:    _OIDCService_CreateCallback_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "zitadel/oidc/v2beta/oidc_service.proto",
}

OIDCService_ServiceDesc is the grpc.ServiceDesc for OIDCService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterOIDCServiceServer

func RegisterOIDCServiceServer(s grpc.ServiceRegistrar, srv OIDCServiceServer)

Types

type AuthRequest

type AuthRequest struct {
	Id           string                 `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	CreationDate *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=creation_date,json=creationDate,proto3" json:"creation_date,omitempty"`
	ClientId     string                 `protobuf:"bytes,3,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"`
	Scope        []string               `protobuf:"bytes,4,rep,name=scope,proto3" json:"scope,omitempty"`
	RedirectUri  string                 `protobuf:"bytes,5,opt,name=redirect_uri,json=redirectUri,proto3" json:"redirect_uri,omitempty"`
	Prompt       []Prompt               `protobuf:"varint,6,rep,packed,name=prompt,proto3,enum=zitadel.oidc.v2beta.Prompt" json:"prompt,omitempty"`
	UiLocales    []string               `protobuf:"bytes,7,rep,name=ui_locales,json=uiLocales,proto3" json:"ui_locales,omitempty"`
	LoginHint    *string                `protobuf:"bytes,8,opt,name=login_hint,json=loginHint,proto3,oneof" json:"login_hint,omitempty"`
	MaxAge       *durationpb.Duration   `protobuf:"bytes,9,opt,name=max_age,json=maxAge,proto3,oneof" json:"max_age,omitempty"`
	HintUserId   *string                `protobuf:"bytes,10,opt,name=hint_user_id,json=hintUserId,proto3,oneof" json:"hint_user_id,omitempty"`
	// contains filtered or unexported fields
}

func (*AuthRequest) Descriptor deprecated

func (*AuthRequest) Descriptor() ([]byte, []int)

Deprecated: Use AuthRequest.ProtoReflect.Descriptor instead.

func (*AuthRequest) GetClientId

func (x *AuthRequest) GetClientId() string

func (*AuthRequest) GetCreationDate

func (x *AuthRequest) GetCreationDate() *timestamppb.Timestamp

func (*AuthRequest) GetHintUserId

func (x *AuthRequest) GetHintUserId() string

func (*AuthRequest) GetId

func (x *AuthRequest) GetId() string

func (*AuthRequest) GetLoginHint

func (x *AuthRequest) GetLoginHint() string

func (*AuthRequest) GetMaxAge

func (x *AuthRequest) GetMaxAge() *durationpb.Duration

func (*AuthRequest) GetPrompt

func (x *AuthRequest) GetPrompt() []Prompt

func (*AuthRequest) GetRedirectUri

func (x *AuthRequest) GetRedirectUri() string

func (*AuthRequest) GetScope

func (x *AuthRequest) GetScope() []string

func (*AuthRequest) GetUiLocales

func (x *AuthRequest) GetUiLocales() []string

func (*AuthRequest) ProtoMessage

func (*AuthRequest) ProtoMessage()

func (*AuthRequest) ProtoReflect

func (x *AuthRequest) ProtoReflect() protoreflect.Message

func (*AuthRequest) Reset

func (x *AuthRequest) Reset()

func (*AuthRequest) String

func (x *AuthRequest) String() string

type AuthorizationError

type AuthorizationError struct {
	Error            ErrorReason `protobuf:"varint,1,opt,name=error,proto3,enum=zitadel.oidc.v2beta.ErrorReason" json:"error,omitempty"`
	ErrorDescription *string     `protobuf:"bytes,2,opt,name=error_description,json=errorDescription,proto3,oneof" json:"error_description,omitempty"`
	ErrorUri         *string     `protobuf:"bytes,3,opt,name=error_uri,json=errorUri,proto3,oneof" json:"error_uri,omitempty"`
	// contains filtered or unexported fields
}

func (*AuthorizationError) Descriptor deprecated

func (*AuthorizationError) Descriptor() ([]byte, []int)

Deprecated: Use AuthorizationError.ProtoReflect.Descriptor instead.

func (*AuthorizationError) GetError

func (x *AuthorizationError) GetError() ErrorReason

func (*AuthorizationError) GetErrorDescription

func (x *AuthorizationError) GetErrorDescription() string

func (*AuthorizationError) GetErrorUri

func (x *AuthorizationError) GetErrorUri() string

func (*AuthorizationError) ProtoMessage

func (*AuthorizationError) ProtoMessage()

func (*AuthorizationError) ProtoReflect

func (x *AuthorizationError) ProtoReflect() protoreflect.Message

func (*AuthorizationError) Reset

func (x *AuthorizationError) Reset()

func (*AuthorizationError) String

func (x *AuthorizationError) String() string

type CreateCallbackRequest

type CreateCallbackRequest struct {
	AuthRequestId string `protobuf:"bytes,1,opt,name=auth_request_id,json=authRequestId,proto3" json:"auth_request_id,omitempty"`
	// Types that are assignable to CallbackKind:
	//
	//	*CreateCallbackRequest_Session
	//	*CreateCallbackRequest_Error
	CallbackKind isCreateCallbackRequest_CallbackKind `protobuf_oneof:"callback_kind"`
	// contains filtered or unexported fields
}

func (*CreateCallbackRequest) Descriptor deprecated

func (*CreateCallbackRequest) Descriptor() ([]byte, []int)

Deprecated: Use CreateCallbackRequest.ProtoReflect.Descriptor instead.

func (*CreateCallbackRequest) GetAuthRequestId

func (x *CreateCallbackRequest) GetAuthRequestId() string

func (*CreateCallbackRequest) GetCallbackKind

func (m *CreateCallbackRequest) GetCallbackKind() isCreateCallbackRequest_CallbackKind

func (*CreateCallbackRequest) GetError

func (*CreateCallbackRequest) GetSession

func (x *CreateCallbackRequest) GetSession() *Session

func (*CreateCallbackRequest) ProtoMessage

func (*CreateCallbackRequest) ProtoMessage()

func (*CreateCallbackRequest) ProtoReflect

func (x *CreateCallbackRequest) ProtoReflect() protoreflect.Message

func (*CreateCallbackRequest) Reset

func (x *CreateCallbackRequest) Reset()

func (*CreateCallbackRequest) String

func (x *CreateCallbackRequest) String() string

type CreateCallbackRequest_Error

type CreateCallbackRequest_Error struct {
	Error *AuthorizationError `protobuf:"bytes,3,opt,name=error,proto3,oneof"`
}

type CreateCallbackRequest_Session

type CreateCallbackRequest_Session struct {
	Session *Session `protobuf:"bytes,2,opt,name=session,proto3,oneof"`
}

type CreateCallbackResponse

type CreateCallbackResponse struct {
	Details     *v2beta.Details `protobuf:"bytes,1,opt,name=details,proto3" json:"details,omitempty"`
	CallbackUrl string          `protobuf:"bytes,2,opt,name=callback_url,json=callbackUrl,proto3" json:"callback_url,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateCallbackResponse) Descriptor deprecated

func (*CreateCallbackResponse) Descriptor() ([]byte, []int)

Deprecated: Use CreateCallbackResponse.ProtoReflect.Descriptor instead.

func (*CreateCallbackResponse) GetCallbackUrl

func (x *CreateCallbackResponse) GetCallbackUrl() string

func (*CreateCallbackResponse) GetDetails

func (x *CreateCallbackResponse) GetDetails() *v2beta.Details

func (*CreateCallbackResponse) ProtoMessage

func (*CreateCallbackResponse) ProtoMessage()

func (*CreateCallbackResponse) ProtoReflect

func (x *CreateCallbackResponse) ProtoReflect() protoreflect.Message

func (*CreateCallbackResponse) Reset

func (x *CreateCallbackResponse) Reset()

func (*CreateCallbackResponse) String

func (x *CreateCallbackResponse) String() string

type ErrorReason

type ErrorReason int32
const (
	ErrorReason_ERROR_REASON_UNSPECIFIED ErrorReason = 0
	// Error states from https://datatracker.ietf.org/doc/html/rfc6749#section-4.2.2.1
	ErrorReason_ERROR_REASON_INVALID_REQUEST           ErrorReason = 1
	ErrorReason_ERROR_REASON_UNAUTHORIZED_CLIENT       ErrorReason = 2
	ErrorReason_ERROR_REASON_ACCESS_DENIED             ErrorReason = 3
	ErrorReason_ERROR_REASON_UNSUPPORTED_RESPONSE_TYPE ErrorReason = 4
	ErrorReason_ERROR_REASON_INVALID_SCOPE             ErrorReason = 5
	ErrorReason_ERROR_REASON_SERVER_ERROR              ErrorReason = 6
	ErrorReason_ERROR_REASON_TEMPORARY_UNAVAILABLE     ErrorReason = 7
	// Error states from https://openid.net/specs/openid-connect-core-1_0.html#AuthError
	ErrorReason_ERROR_REASON_INTERACTION_REQUIRED       ErrorReason = 8
	ErrorReason_ERROR_REASON_LOGIN_REQUIRED             ErrorReason = 9
	ErrorReason_ERROR_REASON_ACCOUNT_SELECTION_REQUIRED ErrorReason = 10
	ErrorReason_ERROR_REASON_CONSENT_REQUIRED           ErrorReason = 11
	ErrorReason_ERROR_REASON_INVALID_REQUEST_URI        ErrorReason = 12
	ErrorReason_ERROR_REASON_INVALID_REQUEST_OBJECT     ErrorReason = 13
	ErrorReason_ERROR_REASON_REQUEST_NOT_SUPPORTED      ErrorReason = 14
	ErrorReason_ERROR_REASON_REQUEST_URI_NOT_SUPPORTED  ErrorReason = 15
	ErrorReason_ERROR_REASON_REGISTRATION_NOT_SUPPORTED ErrorReason = 16
)

func (ErrorReason) Descriptor

func (ErrorReason) Enum

func (x ErrorReason) Enum() *ErrorReason

func (ErrorReason) EnumDescriptor deprecated

func (ErrorReason) EnumDescriptor() ([]byte, []int)

Deprecated: Use ErrorReason.Descriptor instead.

func (ErrorReason) Number

func (x ErrorReason) Number() protoreflect.EnumNumber

func (ErrorReason) String

func (x ErrorReason) String() string

func (ErrorReason) Type

type GetAuthRequestRequest

type GetAuthRequestRequest struct {
	AuthRequestId string `protobuf:"bytes,1,opt,name=auth_request_id,json=authRequestId,proto3" json:"auth_request_id,omitempty"`
	// contains filtered or unexported fields
}

func (*GetAuthRequestRequest) Descriptor deprecated

func (*GetAuthRequestRequest) Descriptor() ([]byte, []int)

Deprecated: Use GetAuthRequestRequest.ProtoReflect.Descriptor instead.

func (*GetAuthRequestRequest) GetAuthRequestId

func (x *GetAuthRequestRequest) GetAuthRequestId() string

func (*GetAuthRequestRequest) ProtoMessage

func (*GetAuthRequestRequest) ProtoMessage()

func (*GetAuthRequestRequest) ProtoReflect

func (x *GetAuthRequestRequest) ProtoReflect() protoreflect.Message

func (*GetAuthRequestRequest) Reset

func (x *GetAuthRequestRequest) Reset()

func (*GetAuthRequestRequest) String

func (x *GetAuthRequestRequest) String() string

type GetAuthRequestResponse

type GetAuthRequestResponse struct {
	AuthRequest *AuthRequest `protobuf:"bytes,1,opt,name=auth_request,json=authRequest,proto3" json:"auth_request,omitempty"`
	// contains filtered or unexported fields
}

func (*GetAuthRequestResponse) Descriptor deprecated

func (*GetAuthRequestResponse) Descriptor() ([]byte, []int)

Deprecated: Use GetAuthRequestResponse.ProtoReflect.Descriptor instead.

func (*GetAuthRequestResponse) GetAuthRequest

func (x *GetAuthRequestResponse) GetAuthRequest() *AuthRequest

func (*GetAuthRequestResponse) ProtoMessage

func (*GetAuthRequestResponse) ProtoMessage()

func (*GetAuthRequestResponse) ProtoReflect

func (x *GetAuthRequestResponse) ProtoReflect() protoreflect.Message

func (*GetAuthRequestResponse) Reset

func (x *GetAuthRequestResponse) Reset()

func (*GetAuthRequestResponse) String

func (x *GetAuthRequestResponse) String() string

type OIDCServiceClient

type OIDCServiceClient interface {
	GetAuthRequest(ctx context.Context, in *GetAuthRequestRequest, opts ...grpc.CallOption) (*GetAuthRequestResponse, error)
	CreateCallback(ctx context.Context, in *CreateCallbackRequest, opts ...grpc.CallOption) (*CreateCallbackResponse, error)
}

OIDCServiceClient is the client API for OIDCService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

type OIDCServiceServer

type OIDCServiceServer interface {
	GetAuthRequest(context.Context, *GetAuthRequestRequest) (*GetAuthRequestResponse, error)
	CreateCallback(context.Context, *CreateCallbackRequest) (*CreateCallbackResponse, error)
	// contains filtered or unexported methods
}

OIDCServiceServer is the server API for OIDCService service. All implementations must embed UnimplementedOIDCServiceServer for forward compatibility

type Prompt

type Prompt int32
const (
	Prompt_PROMPT_UNSPECIFIED    Prompt = 0
	Prompt_PROMPT_NONE           Prompt = 1
	Prompt_PROMPT_LOGIN          Prompt = 2
	Prompt_PROMPT_CONSENT        Prompt = 3
	Prompt_PROMPT_SELECT_ACCOUNT Prompt = 4
	Prompt_PROMPT_CREATE         Prompt = 5
)

func (Prompt) Descriptor

func (Prompt) Descriptor() protoreflect.EnumDescriptor

func (Prompt) Enum

func (x Prompt) Enum() *Prompt

func (Prompt) EnumDescriptor deprecated

func (Prompt) EnumDescriptor() ([]byte, []int)

Deprecated: Use Prompt.Descriptor instead.

func (Prompt) Number

func (x Prompt) Number() protoreflect.EnumNumber

func (Prompt) String

func (x Prompt) String() string

func (Prompt) Type

func (Prompt) Type() protoreflect.EnumType

type Session

type Session struct {
	SessionId    string `protobuf:"bytes,1,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"`
	SessionToken string `protobuf:"bytes,2,opt,name=session_token,json=sessionToken,proto3" json:"session_token,omitempty"`
	// contains filtered or unexported fields
}

func (*Session) Descriptor deprecated

func (*Session) Descriptor() ([]byte, []int)

Deprecated: Use Session.ProtoReflect.Descriptor instead.

func (*Session) GetSessionId

func (x *Session) GetSessionId() string

func (*Session) GetSessionToken

func (x *Session) GetSessionToken() string

func (*Session) ProtoMessage

func (*Session) ProtoMessage()

func (*Session) ProtoReflect

func (x *Session) ProtoReflect() protoreflect.Message

func (*Session) Reset

func (x *Session) Reset()

func (*Session) String

func (x *Session) String() string

type UnimplementedOIDCServiceServer

type UnimplementedOIDCServiceServer struct {
}

UnimplementedOIDCServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedOIDCServiceServer) CreateCallback

func (UnimplementedOIDCServiceServer) GetAuthRequest

type UnsafeOIDCServiceServer

type UnsafeOIDCServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeOIDCServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to OIDCServiceServer will result in compilation errors.

Jump to

Keyboard shortcuts

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