regis

<back to all web services

PersonAuthRequest

Requires Authentication
Required role:REGISUserRole
The following routes are available for this service:
POST/person/{uuid}/auth
import 'package:servicestack/servicestack.dart';
import 'dart:typed_data';

class PersonAuthResponse implements IConvertible
{
    ResponseStatus? responseStatus;
    int? regent_id;
    String? uuid;
    String? first_name;
    String? last_name;
    String? preferred_name;
    List<String>? roles;

    PersonAuthResponse({this.responseStatus,this.regent_id,this.uuid,this.first_name,this.last_name,this.preferred_name,this.roles});
    PersonAuthResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        responseStatus = JsonConverters.fromJson(json['responseStatus'],'ResponseStatus',context!);
        regent_id = json['regent_id'];
        uuid = json['uuid'];
        first_name = json['first_name'];
        last_name = json['last_name'];
        preferred_name = json['preferred_name'];
        roles = JsonConverters.fromJson(json['roles'],'List<String>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'responseStatus': JsonConverters.toJson(responseStatus,'ResponseStatus',context!),
        'regent_id': regent_id,
        'uuid': uuid,
        'first_name': first_name,
        'last_name': last_name,
        'preferred_name': preferred_name,
        'roles': JsonConverters.toJson(roles,'List<String>',context!)
    };

    getTypeName() => "PersonAuthResponse";
    TypeContext? context = _ctx;
}

class PersonAuthRequest implements IConvertible
{
    String? uuid;

    PersonAuthRequest({this.uuid});
    PersonAuthRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        uuid = json['uuid'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'uuid': uuid
    };

    getTypeName() => "PersonAuthRequest";
    TypeContext? context = _ctx;
}

TypeContext _ctx = TypeContext(library: 'data.regent_college.edu', types: <String, TypeInfo> {
    'PersonAuthResponse': TypeInfo(TypeOf.Class, create:() => PersonAuthResponse()),
    'PersonAuthRequest': TypeInfo(TypeOf.Class, create:() => PersonAuthRequest()),
});

Dart PersonAuthRequest DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv

HTTP + CSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /person/{uuid}/auth HTTP/1.1 
Host: data.regent-college.edu 
Accept: text/csv
Content-Type: text/csv
Content-Length: length

{"uuid":"String"}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{"responseStatus":{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}},"regent_id":0,"uuid":"String","first_name":"String","last_name":"String","preferred_name":"String","roles":["String"]}