Home docs nex protocols Ticket Granting (10)
Post

Ticket Granting (10)

This is the only protocol that’s available on the authentication server. Other protocols are only available on the secure server.

If a server is in maintenance, the %retval% result fields are set to Authentication::UnderMaintenance and the other fields of the response are left with empty values.

Methods

(1) Login

Usernames are not case sensitive.

If the username does not exist, the %retval% field is set to RendezVous::InvalidUsername and the other fields are left with empty values.

Request

TypeNameDescription
StringstrUserNameUsername

Response

TypeNameDescription
Result%retval%Result code
PIDpidPrincipalUser pid
BufferpbufResponseKerberos ticket
RVConnectionDatapConnectionDataConnection info for secure server.

The Nintendo Switch allows the secure server to be at the same address as the authentication server. In that case, the secure server station url points to 0.0.0.1 with port 1.
StringstrReturnMsgServer build name

Examples of server build names:

ServerBuild name
Friendsbranch:origin/feature/45925_FixAutoReconnect build:3_10_11_2006_0
DKC:TFbranch:origin/release/ngs/3.4.x.3 build:3_4_13_3_0
MK8branch:origin/project/wup-amk build:3_5_17_2011_0

(2) LoginEx

Usernames are not case sensitive.

If the username does not exist, the %retval% field is set to RendezVous::InvalidUsername and the other fields are left with empty values.

Wii U servers don’t seem to check what’s in the extra data.

Request

TypeNameDescription
StringstrUserNameUsername
Any<AuthenticationInfo>oExtraDataAuthentication info

The server version is in the build name of the server. If the build name is 3_x_y_z_0 then z is the server version. Click here for a list of server build names.

Response

TypeNameDescription
Result%retval%Result code
PIDpidPrincipalUser pid
BufferpbufResponseKerberos ticket
RVConnectionDatapConnectionDataConnection info for secure server.

The Nintendo Switch allows the secure server to be at the same address as the authentication server. In that case, the secure server station url points to 0.0.0.1 with port 1.
StringstrReturnMsgServer build name
StringpSourceKeyOnly present on Switch. If this is a non-empty hex string, key derivation is skipped and this string is used as the key to decrypt the ticket instead.

(3) RequestTicket

If the source or target pid is invalid, the %retval% field is set to Core::AccessDenied and the ticket is empty.

Request

TypeNameDescription
PIDidSourceUser pid
PIDidTargetSecure server pid

Response

TypeNameDescription
Result%retval%Result code
BufferbufResponseKerberos ticket
StringpSourceKeyOnly present on Switch. If this is a non-empty hex string, key derivation is skipped and this string is used as the key to decrypt the ticket instead.

(4) GetPID

This is the reverse of the GetName method. It looks up the pid that belongs to a given username. On all normal accounts the username is the same as the user pid. Each game server also provides a bunch of special users.

Usernames are not case sensitive.

Returns 0 if the username does not exist.

Request

TypeNameDescription
StringstrUserNameUsername

Response

TypeNameDescription
PID%retval%PID

(5) GetName

This is the reverse of the GetPID method. It returns the name associated with the given user pid. Returns an empty string if the pid does not exist.

Request

TypeNameDescription
PIDidPID

Response

TypeNameDescription
String%retval%Username

(6) LoginWithContext

Request

TypeNameDescription
AnyloginDataLogin data

Response

TypeNameDescription
Result%retval%Result code
PIDpidPrincipalUser pid
BufferpbufResponseKerberos ticket
RVConnectionDatapConnectionDataConnection info for secure server

(6) ValidateAndRequestTicketWithParam

Request

This struct does not have any fields.

Response

Types

AuthenticationInfo (Structure)

This structure inherits from Data

TypeNameDescription
Stringm_authTokenToken, as received from the account server
Uint32m_ngsVersionAlways 3 on Wii U. Always 4 on Switch.
Uint8m_authTokenTypeAlways 1 on Wii U. Always 2 on Switch.
Uint32m_serverVersionSee below

ValidateAndRequestTicketParam (Structure)

TypeNameDescription
Uint32platformTypeAlways 3
StringuserNameUsername (your pid)
AnyextraDataNullData or AuthenticationInfo
BoolignoreApiVersionCheck 
Uint32apiVersionGeneralNEX version (e.g. 40601)
Uint32apiVersionCustomClient version

ValidateAndRequestTicketResult (Structure)

TypeNameDescription
PIDsourcePidUser id
BufferbufResponseKerberos ticket
StationURLserviceNodeUrlSecure server location
DateTimecurrentUtcTimeServer time
StringreturnMsgServer build name
StringsourceKeyKerberos key. If present, key derivation is skipped and this key is used to decrypt the ticket instead.

NullData (Structure)

This structure inherits from Data

Contents