appleauth

package
v1.0.19 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2024 License: MIT Imports: 12 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppleID

type AppleID struct {
	Username, Password           string
	Session, AppSpecificPassword string
}

AppleID contains Apple ID auth info

Without 2FA:

Required: username, password

With 2FA:

  Required: username, password, appSpecificPassword
			   session (Only for Fastlane, set as FASTLANE_SESSION)

As Fastlane spaceship uses:

  • iTMSTransporter: it requires Username + Password (or App-specific password with 2FA)
  • TunesAPI: it requires Username + Password (+ 2FA session with 2FA)

type ConnectionAPIKeySource

type ConnectionAPIKeySource struct{}

ConnectionAPIKeySource provides API Key from Bitrise Apple Developer Connection

func (*ConnectionAPIKeySource) Description

func (*ConnectionAPIKeySource) Description() string

Description ...

func (*ConnectionAPIKeySource) Fetch

Fetch ...

type ConnectionAppleIDFastlaneSource

type ConnectionAppleIDFastlaneSource struct{}

ConnectionAppleIDFastlaneSource provides Apple ID from Bitrise Apple Developer Connection, includes Fastlane specific session

func (*ConnectionAppleIDFastlaneSource) Description

func (*ConnectionAppleIDFastlaneSource) Description() string

Description ...

func (*ConnectionAppleIDFastlaneSource) Fetch

Fetch ...

type ConnectionAppleIDSource

type ConnectionAppleIDSource struct{}

ConnectionAppleIDSource provides Apple ID from Bitrise Apple Developer Connection

func (*ConnectionAppleIDSource) Description

func (*ConnectionAppleIDSource) Description() string

Description ...

func (*ConnectionAppleIDSource) Fetch

Fetch ...

type Credentials

type Credentials struct {
	AppleID *AppleID
	APIKey  *devportalservice.APIKeyConnection
}

Credentials contains either Apple ID or APIKey auth info

func Select

func Select(conn *devportalservice.AppleDeveloperConnection, authSources []Source, inputs Inputs) (Credentials, error)

Select return valid Apple ID or API Key based authentication data, from the provided Bitrise Apple Developer Connection or Inputs authSources: required, array of checked sources (in order, the first set one will be used)

for example: []AppleAuthSource{&SourceConnectionAPIKey{}, &SourceConnectionAppleID{}, &SourceInputAPIKey{}, &SourceInputAppleID{}}

inputs: optional, user provided inputs that are not centrally managed (by setting up connections)

type InputAPIKeySource

type InputAPIKeySource struct{}

InputAPIKeySource provides API Key from Step inputs

func (*InputAPIKeySource) Description

func (*InputAPIKeySource) Description() string

Description ...

func (*InputAPIKeySource) Fetch

Fetch ...

type InputAppleIDFastlaneSource

type InputAppleIDFastlaneSource struct{}

InputAppleIDFastlaneSource provides Apple ID from Step inputs, includes Fastlane specific session

func (*InputAppleIDFastlaneSource) Description

func (*InputAppleIDFastlaneSource) Description() string

Description ...

func (*InputAppleIDFastlaneSource) Fetch

Fetch ...

type InputAppleIDSource

type InputAppleIDSource struct{}

InputAppleIDSource provides Apple ID from Step inputs

func (*InputAppleIDSource) Description

func (*InputAppleIDSource) Description() string

Description ...

func (*InputAppleIDSource) Fetch

Fetch ...

type Inputs

type Inputs struct {
	// Apple ID
	Username, Password, AppSpecificPassword string
	// API key (JWT)
	APIIssuer, APIKeyPath string
}

Inputs is Apple Service authentication configuration provided by end user

func (*Inputs) Validate

func (cfg *Inputs) Validate() error

Validate trims extra spaces and checks input grouping

type MissingAuthConfigError

type MissingAuthConfigError struct {
}

MissingAuthConfigError is returned in case no usable Apple App Store Connect / Developer Portal authenticaion is found

func (*MissingAuthConfigError) Error

func (*MissingAuthConfigError) Error() string

type Source

type Source interface {
	Fetch(connection *devportalservice.AppleDeveloperConnection, inputs Inputs) (*Credentials, error)
	Description() string
}

Source returns a specific kind (Apple ID/API Key) Apple authentication data from a specific source (Bitrise Apple Developer Connection, Step inputs)

Jump to

Keyboard shortcuts

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